Create registry login script
That script might be helpful when container registry credentials are wrong. Change-Id: I5b23b0bcadecdf689e20f39744db4a12566823e6
This commit is contained in:
parent
c17c316f23
commit
d3cc894fb9
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue