mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-03 23:14:02 -07:00
Exit with status 3 if no failures but unreachable.
Provide hints to playbook callers that a playbook execution had unreachable vs failures. 2 == failures, 3 == no failures, but unreachable hosts. 0 continues to be all good.
This commit is contained in:
parent
10a0f03cdc
commit
2b96c347dc
2 changed files with 11 additions and 4 deletions
|
@ -159,7 +159,7 @@ if __name__ == '__main__':
|
|||
if 'failed' in result or result.get('rc', 0) != 0:
|
||||
sys.exit(2)
|
||||
if results['dark']:
|
||||
sys.exit(2)
|
||||
sys.exit(3)
|
||||
except errors.AnsibleError, e:
|
||||
# Generic handler for ansible specific errors
|
||||
callbacks.display("ERROR: %s" % str(e), stderr=True, color='red')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue