Thanks again for your reply. I think I have a faulty understanding with the 
way that loops and conditionals apply in Ansible.

cdp_nei.response is a list of dictionaries (containing values for interface 
name, neighbor name and neighbor interface) and I'm using that as an input 
for a loop to build the configuration of the description of the interface 
of switch ports (a combination of neighbor name and neighbor interface). 
This works without the conditional.

I want to add a conditional that only runs the loop element when neighbor 
name is not present in int_stat.response (also a list of dictionaries) 
which contains the configured state of the interfaces. Basically the idea 
is to create the configuration template to reconfigure the interface 
description where it is wrong but not otherwise.

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/b1a4e82e-8b45-470a-80a2-8c7f9316f846%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to