diff --git a/tasks/registry-login.yml b/tasks/registry-login.yml index 472a4b6..51b0ceb 100644 --- a/tasks/registry-login.yml +++ b/tasks/registry-login.yml @@ -24,6 +24,17 @@ debug: msg: "Warning: login failed for some credentials while using docker login" + - name: Create login script + copy: + content: | + #!/bin/bash + docker login "{{ item.key }}" \ + --username "{{ lookup('dict', item.value).key }}" \ + --password "{{ lookup('dict', item.value).value }}" + dest: "/tmp/podman-login-script-{{ item.key }}.sh" + loop: "{{ query('dict', container_registry_logins | default({})) }}" + ignore_errors: true + when: "{{ container_registry_login_script | default(false) }}" + - import_tasks: cleanup-engine.yml when: container_registry_cleanup_client -