On 09.08.2018 15:47, [email protected] wrote:
I still consider it counterintuitive that Ansible evaluates
with_items: even if when: skips it, but no use arguing here.
That's because when is evaluated for each element in with_items, so
with_items must run before when.
Remember that you can use the item variable in when, just to illustrate
- debug: msg="I run"
when: item == True
with_items:
- True
- False
- True
with_items must run first so when has the correct value for the variable
item.
--
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/f00e0d661a599a2ed8270350aa602c26%40olstad.com.
For more options, visit https://groups.google.com/d/optout.