In playbooks, a return code (rc) of non-zero should fail the playbook.

pull/70/head
Michael DeHaan 13 years ago
parent 6ab615c724
commit b43019f3a1

@ -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:

Loading…
Cancel
Save