- name: Verify repository names when: | container_registry_credentials is defined and zj_image.registry not in container_registry_credentials loop: "{{ container_images }}" loop_control: loop_var: zj_image fail: msg: "{{ zj_image.registry }} credentials not found" - name: Verify repository permission when: | container_registry_credentials[zj_image.registry].repository is defined and not zj_image.repository | regex_search(container_registry_credentials[zj_image.registry].repository) loop: "{{ container_images }}" loop_control: loop_var: zj_image fail: msg: "{{ zj_image.repository }} not permitted by {{ container_registry_credentials[zj_image.registry].repository }}" - name: Promote image when: promote_container_image_method|default('tag') == 'tag' loop: "{{ container_images }}" loop_control: loop_var: zj_image include_tasks: promote-retag.yaml - name: Promote container image with intermediate registry when: promote_container_image_method|default('tag') == 'intermediate-registry' include_tasks: promote-from-intermediate-registry.yaml