Thanks it worked.
I get all this extra debug info.  Is there a way to display only the 2nd 
line: "msg": "Name is Vlan1 and status is administratively down"?

TASK [display output] 
******************************************************************************************************************
ok: [burnside-poc-sw8.gw.mcgill.ca] => (item={'status': u'administratively 
down', 'protocol': u'down', 'name': u'Vlan1', 'ok': u'YES', 'ipaddress': 
u'unassigned', 'method': u'NVRAM'}) => {
    "msg": "Name is Vlan1 and status is administratively down"
}
ok: [burnside-poc-sw8.gw.mcgill.ca] => (item={'status': u'up', 'protocol': 
u'up', 'name': u'Vlan99', 'ok': u'YES', 'ipaddress': u'172.31.35.8', 
'method': u'NVRAM'}) => {
    "msg": "Name is Vlan99 and status is up"
}
ok: [burnside-poc-sw8.gw.mcgill.ca] => (item={'status': u'administratively 
down', 'protocol': u'down', 'name': u'Vlan252', 'ok': u'YES', 'ipaddress': 
u'unassigned', 'method': u'NVRAM'}) => {
    "msg": "Name is Vlan252 and status is administratively down"
}


 

> int_output.interfaces is a list and you need to use with_items. 


>   - name: display output 

    debug: 

      var: "Name is {{ item.name }} and status is {{ item.status }}" 

    with_items: "{{ int_output.interfaces }}" 


>
>
> -- 

Kai Stian Olstad 


>
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/64d55e80-d77c-42c7-bc44-d126d99086f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to