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_hostname in groups[x] do a x in group_names On Wednesday, August 5, 2015 at 3:25:31 PM UTC+2, R. Dikkes wrote: > > 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 Coca wrote: >>> >>> 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 [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/4edd2987-79ee-4d00-a742-998924e42a8b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
