Skip to content

Commit

Permalink
Merge pull request #2226 from IPvSean/devel
Browse files Browse the repository at this point in the history
backup ee option with container registry on AWS
  • Loading branch information
IPvSean authored Jan 16, 2025
2 parents ed7a6a7 + 6531769 commit 3176c7d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 9 deletions.
1 change: 1 addition & 0 deletions provisioner/group_vars/all/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ f5_ee: "quay.io/acme_corp/f5_ee:latest"
security_ee: "quay.io/acme_corp/security_ee:latest"
rhel_ee: "registry.redhat.io/ansible-automation-platform-23/ee-supported-rhel8:1.0.0-208"
network_ee: "quay.io/acme_corp/network-ee:latest"
network_ee_backup: "public.ecr.aws/v5m3b2e6/acme_corp/network-ee:latest"
rhel_90_ee: "quay.io/acme_corp/rhel_90_ee:latest"
windows_ee: "quay.io/acme_corp/windows_ee:latest"
smart_mgmt_ee: "quay.io/s4v0/ee-automated-smart-mgmt-29:latest"
Expand Down
37 changes: 28 additions & 9 deletions roles/control_node_always/tasks/20_workshop_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,31 @@
dest: "/etc/ansible/ansible.cfg"
mode: '0644'

# Pull specific EE for each workshop based on workshop name
- name: Pull execution environment for {{ workshop_type }}
become: true
become_user: "{{ username }}"
containers.podman.podman_image:
name: "{{ lookup('vars', workshop_type + '_ee') }}"
register: podman_pull
until: podman_pull is not failed
retries: 5
# # Pull specific EE for each workshop based on workshop name
# - name: Pull execution environment for {{ workshop_type }}
# become: true
# become_user: "{{ username }}"
# containers.podman.podman_image:
# name: "{{ lookup('vars', workshop_type + '_ee') }}"
# 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 3176c7d

Please sign in to comment.