From 0534b031fa5d6c26e0906cdc898aed2c3e38101f Mon Sep 17 00:00:00 2001 From: djpbessems Date: Mon, 22 Aug 2022 14:54:54 +0200 Subject: [PATCH] Handle duplicate images;Add registry endpoint --- .../files/ansible_payload/templates/registries.j2 | 7 ++++++- ansible/roles/metacluster/tasks/components.yml | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ansible/roles/firstboot/files/ansible_payload/templates/registries.j2 b/ansible/roles/firstboot/files/ansible_payload/templates/registries.j2 index 5579759..59cb242 100644 --- a/ansible/roles/firstboot/files/ansible_payload/templates/registries.j2 +++ b/ansible/roles/firstboot/files/ansible_payload/templates/registries.j2 @@ -1,4 +1,9 @@ mirrors: + cr.step.cm: + endpoint: + - https://registry.{{ vapp['metacluster.fqdn'] }} + rewrite: + "(.*)": "library/cr.step.sm/$1" docker.io: endpoint: - https://registry.{{ vapp['metacluster.fqdn'] }} @@ -15,6 +20,6 @@ mirrors: rewrite: "(.*)": "library/quay.io/$1" configs: - "registry.{{ vapp['metacluster.fqdn'] }}": + registry.{{ vapp['metacluster.fqdn'] }}: tls: insecure_skip_verify: true diff --git a/ansible/roles/metacluster/tasks/components.yml b/ansible/roles/metacluster/tasks/components.yml index 86888c4..ea6e00d 100644 --- a/ansible/roles/metacluster/tasks/components.yml +++ b/ansible/roles/metacluster/tasks/components.yml @@ -54,7 +54,7 @@ docker://{{ item }} \ docker-archive:./{{ ( item | regex_findall('[^/:]+'))[-2] }}.tar:{{ item }} chdir: /opt/metacluster/container-images - loop: "{{ (containerimages.results | map(attribute='stdout_lines') | flatten) + dependencies.container_images }}" + loop: "{{ ((containerimages.results | map(attribute='stdout_lines') | flatten) + dependencies.container_images) | unique }}" # - name: Inject manifests # ansible.builtin.template: