mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
In playbooks, a return code (rc) of non-zero should fail the playbook.
This commit is contained in:
@@ -214,7 +214,7 @@ class PlayBook(object):
|
||||
self.dark[host] = 1
|
||||
for (host, host_result) in contacted_hosts.iteritems():
|
||||
self.processed[host] = 1
|
||||
if 'failed' in host_result:
|
||||
if 'failed' in host_result or (int(host_result.get('rc',0)) != 0):
|
||||
self.callbacks.on_failed(host, host_result)
|
||||
self.failures[host] = 1
|
||||
elif 'skipped' in host_result:
|
||||
|
||||
Reference in New Issue
Block a user