with_nested is intended to be iteration over two loops, a nested loop.

with_nested over a single list doesn't seem to make sense for me, you would
just use "with_items".

A nested loop over *one* list offends my computer science sensibilities,
and may also indicate a typo from the user, I don't think it should "just
attempt to do something else" here.




On Mon, Feb 24, 2014 at 5:01 AM, Jerome Wagner <[email protected]> wrote:

> Hello,
>
> I don't know if this is normal (feature?) or if it can be considered as a
> bug that needs to be fixed :
>
> - name: my task
>   action: ...
>   with_nested:
>     - myList
>
> does not loop over myList with each item referenced as item.0
>
> I always have to go the "with_items: myList" and this breaks my workflow
> because
>  * when a task starts needing a nested loop all the item references need
> to be changed (from item to item.0 for instance).
>  * I cannot copy/paste references between tasks using with_items and tasks
> using with_nested.
>
> I can always write
>
> - name: my task
>   action: ...
>   with_nested:
>     - myList
>     - [ "" ]
>
> but it feels clunky.
>
> Has any of you encountered the same problem ?
>
>
>
>  --
> 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/a3a7f704-24c4-4c5d-8af3-256716985036%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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/CAEVJ8QObzawad%3Ds5%2Bc9SbNfrMZ9fTM7Xrpe6-pw4HHLvq0T98w%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to