Re: [ansible-project] Templete statement that can qualify mulitiple inventory_hostname

2017-12-13 Thread Mike Johnston
That was it! I knew it would be simple...just not that simple. Thank you Stian. :) On Tuesday, December 12, 2017 at 11:42:54 PM UTC-6, Kai Stian Olstad wrote: > > On 12.12.2017 23:56, Mike Johnston wrote: > > *hosts file:* > > [group1] > > system1 > > system2 > > system3 > > > >

Re: [ansible-project] Templete statement that can qualify mulitiple inventory_hostname

2017-12-12 Thread Kai Stian Olstad
On 12.12.2017 23:56, Mike Johnston wrote: *hosts file:* [group1] system1 system2 system3 roles/fubar/templates/mytest.j2 {% if inventory_hostname == "server1" %} This is a test {% endif %} This works... but what if I want this line on server1 and server3? Preferably something a role assigned

[ansible-project] Templete statement that can qualify mulitiple inventory_hostname

2017-12-12 Thread Mike Johnston
I'm trying to figure out how to pass statement that will match multiple hostnames instead of just one. I know how to do it with a group in the hosts file, but I need it to be something I set in the defaults part of the role. I'm sure sure the answer is really easy but I'm just getting used to