Thanks, I'll try this too.

On Tuesday, February 14, 2017 at 12:19:30 PM UTC-5, Kai Stian Olstad wrote:
>
> 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/6d9d4838-a40f-4fab-8882-9780a6b17232%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to