I have problem at conditional include playbook: For example, I am following three simple playbooks:
playbook0.yml: --- - hosts: test-servers tasks: - debug: msg="incude playbook0.yml" playboo1.yml: --- - hosts: test-servers tasks: - debug: msg="incude playbook1.yml" playbook.yml: --- - include: playbook0.yml when: run0 == 'true' - include: playbook1.yml when: run1 == 'true' I try to run my playbook: ansible-playbook -i hosts playbook.yml --extra-vars="run1=true run0=false" But it looks like the condition is not working. playbook0 and playbook1 are always included no matter what condition I set. What I did wrong? Is it possible to include another playbook conditionally? Thanks Jack -- 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/5e7cb3ae-0ba5-4e5b-8b7d-ceae56abad8e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
