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,
-- 
Joseph Kodjo-Kuma Djomeda
check out my pains at : www.mycodingpains.com
We become what we think about ourselves........

-- 
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 group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAKDXoa%2BWp2ppPVZ%2BhuW7OP80ScHpTxQce0yV4T6aV1Ej9Pi0UQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to