mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
In playbooks, a return code (rc) of non-zero should fail the playbook.
This commit is contained in:
parent
6ab615c724
commit
b43019f3a1
1 changed files with 1 additions and 1 deletions
|
@ -214,7 +214,7 @@ class PlayBook(object):
|
||||||
self.dark[host] = 1
|
self.dark[host] = 1
|
||||||
for (host, host_result) in contacted_hosts.iteritems():
|
for (host, host_result) in contacted_hosts.iteritems():
|
||||||
self.processed[host] = 1
|
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.callbacks.on_failed(host, host_result)
|
||||||
self.failures[host] = 1
|
self.failures[host] = 1
|
||||||
elif 'skipped' in host_result:
|
elif 'skipped' in host_result:
|
||||||
|
|
Loading…
Reference in a new issue