Covert lookup to query

This change updates our loop so that it will expect a list.

More on the query lookup can be seen here[0]

[0] https://docs.ansible.com/ansible/2.6/plugins/lookup.html#invoking-lookup-plugins-with-query

Change-Id: Id8bfea751a7239fd9be6e9dbbb5a0a700e29b64e
Closes-Bug: #1835657
Related-Bug: #1833584
Signed-off-by: Kevin Carter <kecarter@redhat.com>
This commit is contained in:
Kevin Carter 2019-07-10 14:52:18 -05:00
parent 54526ccde7
commit b295cc9aef
1 changed files with 1 additions and 2 deletions

View File

@ -6,6 +6,5 @@
username: "{{ lookup('dict', item.value).key }}"
password: "{{ lookup('dict', item.value).value }}"
registry: "{{ item.key }}"
loop: "{{ lookup('dict', container_registry_logins) }}"
loop: "{{ query('dict', container_registry_logins) }}"
when: container_registry_logins | length > 0