Hi,
I saw the dict2items filter, which can be use with
# with this var
ips:
foo: 192.168.1.4
bar: 1.2.3.4
# a task with a loop on it
debug:
msg: "here is an ip {{ item.value }}
loop: "{{ ips | dict2items | list }}"
When only keys or values are needed, the use of .keys() or .values() seems
easier (especially with filters)
debug:
msg: "here is a private ip {{ item }}"
loop: "{{ ips.values() | list | ipaddr('private') | default('') }}"
but I didn't find any mention of this in the official doc, neither in the
examples I saw, is it better to avoid this way of looping ?