Skip to content

Commit

Permalink
Update 20_workshop_setup.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
IPvSean committed Jan 16, 2025
1 parent 39b555c commit 6531769
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions roles/control_node_always/tasks/20_workshop_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,21 @@
# until: podman_pull is not failed
# retries: 5

# Pull specific EE for each workshop based on workshop name
- name: Pull the first available execution environment for {{ workshop_type }}
containers.podman.podman_image:
name: "{{ item }}"
with_first_found:
- "{{ lookup('vars', workshop_type + '_ee') }}"
- "{{ lookup('vars', workshop_type + '_ee_backup') }}"
register: podman_pull
until: podman_pull is not failed
retries: 5
- name: Attempt to pull the primary or backup execution environment
block:
# Try pulling the primary execution environment
- name: Pull primary execution environment
containers.podman.podman_image:
name: "{{ lookup('vars', workshop_type + '_ee') }}"
register: primary_podman_pull
retries: 5
until: primary_podman_pull is not failed

rescue:
# Pull the backup execution environment if primary fails
- name: Pull backup execution environment
containers.podman.podman_image:
name: "{{ lookup('vars', workshop_type + '_ee_backup') }}"
register: backup_podman_pull
retries: 5
until: backup_podman_pull is not failed

0 comments on commit 6531769

Please sign in to comment.