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


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/3442a153-a9ee-47c3-9e05-95221de575ban%40googlegroups.com.

Reply via email to