Skip to content

Commit

Permalink
try this now
Browse files Browse the repository at this point in the history
  • Loading branch information
l3acon committed Sep 9, 2024
1 parent af7ae3e commit 79fb1ea
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 15 deletions.
38 changes: 24 additions & 14 deletions openshift/hub/registries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
hosts: localhost
vars:
remove_ee_repositories:
- ansible-automation-platform-24/ee-29-rhel8
- ansible-automation-platform-24/ee-minimal-rhel8
- ansible-automation-platform-24/ee-minimal-rhel9
- ansible-automation-platform-24/ee-supported-rhel8
- ansible-automation-platform-24/ee-supported-rhel9
- ansible-automation-platform/ee-29-rhel8
- ansible-automation-platform/ee-minimal-rhel8
- ansible-automation-platform/ee-minimal-rhel9
- rhoso-edpm-beta/ee-openstack-ansible-ee-rhel9
- rhoso-operators/ee-openstack-ansible-ee-rhel9
- name: ansible-automation-platform-24/ee-29-rhel8
- name: ansible-automation-platform-24/ee-minimal-rhel8
- name: ansible-automation-platform-24/ee-minimal-rhel9
- name: ansible-automation-platform-24/ee-supported-rhel8
- name: ansible-automation-platform-24/ee-supported-rhel9
- name: ansible-automation-platform/ee-29-rhel8
- name: ansible-automation-platform/ee-minimal-rhel8
- name: ansible-automation-platform/ee-minimal-rhel9
- name: rhoso-edpm-beta/ee-openstack-ansible-ee-rhel9
- name: rhoso-operators/ee-openstack-ansible-ee-rhel9

gather_facts: false
tasks:
Expand All @@ -23,16 +23,16 @@
fail_msg: "Please provide `Usable Automation Hub Credential`"

# This should not be necessary, but for some reason, superfulious repositories have led to sync failures
- name: Remove default EE repository
- name: Remove default EE repositories
infra.ah_configuration.ah_ee_repository:
name: "{{ item }}"
state: absent
ah_host: "{{ automation_hub_url }}"
ah_username: 'admin'
ah_password: "{{ lookup('ansible.builtin.env', 'CONTROLLER_PASSWORD') }}"
loop: "{{ remove_ee_repositories }}"
loop: "{{ remove_ee_repositories | map(attribute='name' | difference(ah_ee_repositories | map(attribute='name')) }}"

- name: Add Console EE credential
- name: Add Console EE credential to EE Registry
infra.ah_configuration.ah_ee_registry:
name: "{{ item.name }}"
url: "{{ item.url }}"
Expand All @@ -43,6 +43,16 @@
password: "{{ lookup('ansible.builtin.env', 'REGISTRY_PASSWORD') }}"
loop: "{{ ah_ee_registries }}"

- name: Create EE repository
infra.ah_configuration.ah_ee_repository:
name: "{{ item.name }}"
registry: "{{ item.registry }}"
state: present
ah_host: "{{ automation_hub_url }}"
ah_username: 'admin'
ah_password: "{{ lookup('ansible.builtin.env', 'CONTROLLER_PASSWORD') }}"
loop: "{{ ah_ee_repositories }}"


# - name: Index AH registries
# infra.ah_configuration.ah_ee_registry_index:
Expand Down Expand Up @@ -72,7 +82,7 @@
ah_host: "{{ automation_hub_url }}"
ah_username: 'admin'
ah_password: "{{ lookup('ansible.builtin.env', 'CONTROLLER_PASSWORD') }}"
loop: "{{ ah_ee_images }}"
loop: "{{ ah_ee_repositories }}"
retries: 80
register: sync_image
delay: 10
Expand Down
3 changes: 2 additions & 1 deletion openshift/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ controller_templates:
ah_ee_registries:
- name: rh-registry
url: https://registry.redhat.io
ah_ee_images:
ah_ee_repositories:
- name: "ansible-automation-platform-24/ee-supported-rhel9"
registrY: "rh-registry"

- name: OpenShift / CNV / Install Operator
job_type: run
Expand Down

0 comments on commit 79fb1ea

Please sign in to comment.