Hi,
I have list of items in configuration files as variable
hostenv:
- env: test
Serverconf:
Resource:
- mem:
Interface:
- { name: eth0, address: 10.0.10.2}
- {eth1: .....}
Now, I would like to fetch and print the values from interface {{ item.address }}
I tried to loop multiple usecase, but failed with object undefined error
Playbook:
task:
- debug:
msg: {{ item.address }}
loop: {{ hostenv.Serverconf.Interface }}
loop_var: item
Thanks