Hi
What is the reason for doing Exit code 0 on a skipping: no hosts match ?
I would really love to get a different exit code, so I get a warning if my playbook failed to run against a host…
My ansible inventory is run up against a dynamic inventory, so I need to know if the host is not available from there.
I run my playbook with:
- hosts: ‘{{ target }}’
And pass it to the playbook as --extra-vars “target=x.x.x.x”
Is there a way I don’t know about I can force an error if its not there?
My alternative is to run checks against the inventory beforehand, but if I can skip that step it would greatly simplify my task.