Hi All

I've got an Ansible playbook that I'm running against a custom inventory
group I've created. The issue is that this group may or may not be empty. I
only want Ansible to exit non-zero if it ran against a host (or hosts) and
any of them failed (standard Ansible behavior), but I don't want Ansible to
exit non-zero if the group is empty (or if the group doesn't exist).

The reason why I want it to exit 0 if no hosts match is that I'm running it
from a CI system and exiting non-zero means the job failed, which is not
true in the case of no hosts matching (it just means it had nothing to do).

Any suggestions?

- Gonz

-- 
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/CAHpidMDMDTd%3D3V6qCA_DzghFEem5n__851c-RYtqjvZ77Dqr8w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to