Re: [ansible-project] How to conditionally include other playbooks?

2016-09-23 Thread Brian Coca
That will work with task includes, not play includes. -- Brian Coca -- 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

Re: [ansible-project] How to conditionally include other playbooks?

2016-09-23 Thread trey perrone
I've done includes for playbooks based on facts typically OS - name: include OS specific tasks include: "{{ ansible_os_family|lower }}.yml" if there was a specifc fact you could use such OS, RAM, CPU, write a custom module to make that fact. I guess at that point why not target machines

Re: [ansible-project] How to conditionally include other playbooks?

2016-09-22 Thread Tristan Muntsinger
Is there an alternative solution to get the behavior I'd like? -Tristan On Wednesday, September 21, 2016 at 5:08:35 PM UTC-7, Brian Coca wrote: > > playbooks cannot be included conditionally. > > > -- > Brian Coca > -- You received this message because you are subscribed to the Google

Re: [ansible-project] How to conditionally include other playbooks?

2016-09-21 Thread Brian Coca
playbooks cannot be included conditionally. -- Brian Coca -- 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] How to conditionally include other playbooks?

2016-09-21 Thread Tristan Muntsinger
I tried this and it isn't working as expected: test.yml --- - include: 1.yml when: type == '1' - include: 2.yml when: type == '2' 1.yml --- - name: "1" hosts: localhost tasks: - debug: msg="1" 2.yml --- - name: "2" hosts: localhost tasks: - debug: msg="2" Command: