The loop_control documentation doesn't make really explain how I can use it 
in my case.

On Saturday, February 11, 2017 at 4:35:18 AM UTC-5, Kai Stian Olstad wrote:
>
> On 10. feb. 2017 23:24, ZillaYT wrote: 
> > Let me as a different question. What If I want to show ALL the files in 
> a 
> > debug task, like this 
> > 
> > - debug: msg="Key = {{ item.key }} values = {{ item.value }}" 
> >   with_dict: "{{ war_files }}" 
> > 
> > I want to see an output like this 
> > 
> > "msg" : "Key = server1 value = file1.war" 
> > "msg" : "Key = server1 value = file2.war" 
> > "msg" : "Key = server2 value = file1.war" 
> > "msg" : "Key = server2 value = file2.war" 
> > "msg" : "Key = server2 value = file3.war" 
> > 
> > IOW, I want to iterate over the keys, then the values in each key. 
>
> Your item.value is a list so to list them as you want you will need a 
> loop in a loop. 
> Check out loop_control 
> https://docs.ansible.com/ansible/playbooks_loops.html#loop-control 
>
> Or you can change you variable structure so you can do this in one loop. 
>
> -- 
> 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/2281315d-0393-4e64-a0de-078ca8268d2c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to