Allow dict2items to work with hostvars (#53538)

This commit is contained in:
Matt Martz 2019-03-08 14:36:53 -06:00 committed by GitHub
commit 414440e323
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 2 deletions

View file

@ -266,3 +266,10 @@
- "'192.168.0.1/24' | ipaddr('network') == '192.168.0.0'"
- "'fe80::dead:beef/64' | ipaddr('broadcast') == 'fe80::ffff:ffff:ffff:ffff'"
- "'::1/120' | ipaddr('netmask') == 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ff00'"
- name: Ensure dict2items works with hostvars
debug:
msg: "{{ item.key }}"
loop: "{{ hostvars|dict2items }}"
loop_control:
label: "{{ item.key }}"