[ansible-project] Re: Targeting Windows & Linux Machines from One Role

2017-09-21 Thread Jordan Borean
In your main.yml put in include_tasks: windows.yml when the host is Windows and include_tasks: unix.yml when it is not. You can use the gathered facts to do this or you can have a variable that can be set when running on Windows by the end user. Personally I think you should still split the rol

[ansible-project] Re: Targeting Windows & Linux Machines from One Role

2017-09-22 Thread 'J Hawkesworth' via Ansible Project
I'd back this up I have win- roles and linux- roles Bear in mind you can run multiple plays in one playbook, targeting different host groups. Also since a linux host isn't ever also a windows host you can probably run playbooks in parallel, even if they are installing the same 'thing' such as

Re: [ansible-project] Re: Targeting Windows & Linux Machines from One Role

2017-09-22 Thread Heather Luna
Thank you! :) On Thu, Sep 21, 2017 at 3:09 PM, Jordan Borean wrote: > In your main.yml put in include_tasks: windows.yml when the host is > Windows and include_tasks: unix.yml when it is not. You can use the > gathered facts to do this or you can have a variable that can be set when > running on

Re: [ansible-project] Re: Targeting Windows & Linux Machines from One Role

2017-09-22 Thread Heather Luna
Thank you! :) On Fri, Sep 22, 2017 at 7:40 AM, 'J Hawkesworth' via Ansible Project < ansible-project@googlegroups.com> wrote: > I'd back this up I have win- roles and linux- roles > > Bear in mind you can run multiple plays in one playbook, targeting > different host groups. Also since a linux h