When ansible gets a list of lists, with_items will talk over them all as
one list.

This is so  you can install packages from multiple lists in one
transaction, which is a very common use case.

You can also walk over a list of hashes and it won't compress them.



On Fri, Dec 13, 2013 at 12:10 AM, Dmitry Makovey <[email protected]>wrote:

> found  solution, but not the explanation:
>
> - hosts: all
>   vars:
>   - hello:
>     - [[ 'Hello', 'world' ]]
>     - [[ 'Goodbye', 'people' ]]
>   tasks:
>   - name: Testing loop
>     shell: echo {{ item.0 }} {{ item.1 }}
>     with_items: hello
>
> why do I need to double-bracket arrays? Or to put it another way: why does
> ansible extract arrays by default?
>
>  --
> 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].
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Michael DeHaan <[email protected]>
CTO, AnsibleWorks, Inc.
http://www.ansibleworks.com/

-- 
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].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to