Specify a default for container_registry_logins

When we run this, we'll run the controller host_prep_tasks but the
compute nodes are included. Ansible will skip the set_fact on the
computes but still try to evaluate the lookup. We need to use |default
to handle the unset case.

Change-Id: I1ff41befbd66325d90c3ea18640a298549d1b659
Closes-Bug: #1835657
(cherry picked from commit a6ff00885c)
This commit is contained in:
Alex Schultz 2019-07-12 14:55:35 -06:00 committed by yatin
parent 0731b9ba17
commit 2871ce0fa9
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ outputs:
REGISTRY_USERNAME: "{{ lookup('dict', item.value).key }}"
REGISTRY_PASSWORD: "{{ lookup('dict', item.value).value }}"
REGISTRY: "{{ item.key }}"
loop: "{{ query('dict', container_registry_logins) }}"
loop: "{{ query('dict', container_registry_logins | default({})) }}"
when:
- container_registry_login | bool
- container_registry_logins