with_items: somelist
It wont.. It will take somelist and otherlist as values for {{ item }} variable. For example, if I do:user: name={{ item }}with_items:- somelist- otherlistIt will create two users: somelist and otherlist
--
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 ansible-proje...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
"I've found that sometimes neither with_items or with_flattened did what I needed, at least on the face of it."
Which is what exactly?
--
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 ansible-proje...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Note that you should not use the name "item" in for a variable as that's the name of the loop index, not sure if that was just illustrative or what :)
with_items:
- list
- [scalar]
Won't work per se because it won't know to replace the bareword inside brackets with a variable
with_items:
- list
- [ "{{scalar}}" ]
Should be fine (untested)