Re: [ansible-project] Non-existing group resulted in error.

2015-08-17 Thread Nico K.
Ignoring errors is hardly ever the correct way of dealing with things. Anyway, for those interested, the obvious fix is to check whether the group you are looking for is in the current list of groups instead of checking whether the nodename is in a specific group, so instead of: inventory_hostn

Re: [ansible-project] Non-existing group resulted in error.

2015-08-05 Thread R. Dikkes
Maybe you could look at ignore_error ? On Wednesday, August 5, 2015 at 7:35:27 AM UTC+2, Nico K. wrote: > > It to ignore the fact that this group doesn't exist within this > playbook/inventory for the sake of re-usability of the role. > > On Tuesday, August 4, 2015 at 11:00:01 PM UTC+2, Brian Coc

Re: [ansible-project] Non-existing group resulted in error.

2015-08-04 Thread Nico K.
It to ignore the fact that this group doesn't exist within this playbook/inventory for the sake of re-usability of the role. On Tuesday, August 4, 2015 at 11:00:01 PM UTC+2, Brian Coca wrote: > > I for one expect it to fail, what were you expecting? > > > > > -- > Brian Coca > -- You receive

Re: [ansible-project] Non-existing group resulted in error.

2015-08-04 Thread Brian Coca
I for one expect it to fail, what were you expecting? -- 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+unsubscr...@googlegro

[ansible-project] Non-existing group resulted in error.

2015-08-04 Thread Nico K.
- name: task debug: msg="I will fail" when: inventory_hostname in groups['doesnotexist'] fatal: [host] => error while evaluating conditional: inventory_hostname in groups['doesnotexist'] I'm assuming this is not expected behavior? Running Ansible 1.9.2, if it's not, I'll be happy to file a