Hello Guys,
This has been probably solved before so apologies if this is a repeat. I was confused about tasks in a include file being run even though the condition for the include itself is not true.
so in my main.yml I have an include system like a switch kind of logique: say
- include: this.yml
when: include_this_enable|default(false)
- include: that.yml
when: include_that_enable|default(false)
To my surprise I needed to also add the when conditions to this.yml and that.yml for it to work before everything would run otherwise as shown in here http://pastie.org/10392488
when this.yml has a lot of tasks this become difficult to do. How to strictly run tasks in this.yml only base on a condition?
Thanks in advance
Best Regads,