I'm running into the infamous issue where with_items isn't skipped if when
evaluates to false (https://github.com/ansible/ansible/issues/13791). That
said, I'm at loss as to how to workaround my particular issue.
Consider these two tasks (simplified for discussion):
#> cat b.yml
---
- hosts: 1
On 08.08.2018 22:10, rjwagner@gmail.com wrote:
I'm running into the infamous issue where with_items isn't skipped if
when
evaluates to false (https://github.com/ansible/ansible/issues/13791).
That
said, I'm at loss as to how to workaround my particular issue.
It's not that infamous, it's
Thanks very much, Kai. This does help my understanding. I was trying to
use default() after the b.stdout to generate the JSON (i.e., have default
generate '{ "a": "[]" }') and wasn't having any luck because of all the
nested quotes. I still consider it counterintuitive that Ansible evaluates
On 09.08.2018 15:47, rjwagner@gmail.com 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 ca
Ah, yes. Makes sense now. Thanks Kai.
Rob
--
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-project+unsubscr...@googlegroups.com.
To post to this gro