On 09.01.2018 22:47, Amishi Shah wrote:
In the code I want to iterate over all the dictionaries listed in
list_of_dict. So that whenever a new dictionary is added in the variable file, the code handles it dynamically and there is no need to change the
with_dict list.


I tried to look into Ansible approaches but I could not find out the way to
iterate over two things (list and dictionaries) at the same time.

Check out loop_control
http://docs.ansible.com/ansible/latest/playbooks_loops.html#loop-control


--
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/f7310e72fa7bdae2ea92fa5f09813c09%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to