On 14. feb. 2017 17:54, ZillaYT wrote:
I posted the same question on Stackoverflow, and got the answer I was
looking for. Ugly, but it works.
http://stackoverflow.com/questions/42167747/how-to-loop-over-this-dictionary-in-ansible
Or just use loop in a loop with loop control.
Task:
- include: loop.yml
with_dict: "{{ war_files }}"
loop_control:
loop_var: outer_item
And the loop.yml contain the following.
---
- debug: msg="My key in {{ outer_item.key }} and the value is {{ item }}"
with_items: "{{ outer_item.value }}"
--
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 [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/80ffb9b6-a372-03be-00ed-54ba7425b69a%40olstad.com.
For more options, visit https://groups.google.com/d/optout.