mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-03 23:14:02 -07:00
Indicate errors with exit code.
This commit is contained in:
parent
53d24ef002
commit
01e922aa69
2 changed files with 9 additions and 0 deletions
|
@ -140,6 +140,10 @@ def main(args):
|
|||
colorize('failed', t['failures'], 'red'))
|
||||
|
||||
print "\n"
|
||||
for h in hosts:
|
||||
stats = pb.stats.summarize(h)
|
||||
if stats['failures'] != 0 or stats['unreachable'] != 0:
|
||||
sys.exit(1)
|
||||
|
||||
except errors.AnsibleError, e:
|
||||
print >>sys.stderr, "ERROR: %s" % e
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue