И смотрите что получается
вот просто с items
TASK [show dict] ************************************************************************************************************************************************************
ok: [localhost] => (item=a1) => {
"msg": {
"network_params": {
"NTP": "10.10.10.1",
"description": "network1",
"domain": "network1.local",
"gateway": "10.10.10.1",
"label": "network1",
"netmask": "255.255.255.0",
"subnet": "10.10.10.0"
},
- name: show dict
debug: msg='{{ lookup('vars', item.network_params) }}'
loop: "{{ instance | flatten(levels=1) }}"
"msg": "The task includes an option with an undefined variable