Commit e89131a3 by Michael DeHaan

playbooks -- Ratchet up logging prior to gating things with verbosity controls…

playbooks -- Ratchet up logging prior to gating things with verbosity controls and upgrading output format
parent a5f4ca50
......@@ -84,6 +84,14 @@ class PlaybookCallbacks(object):
def on_dark_host(self, host, msg):
print "exception: [%s] => %s" % (host, msg)
def summarize(results):
''' print out per host statistics '''
print "PLAY RECAP ******************************\n"
hosts = sorted(results.keys())
for host in hosts:
print "%s : %s" % (host, utils.smjson(results[host]))
def main(args):
''' run ansible-playbook operations '''
......@@ -125,7 +133,8 @@ def main(args):
timeout=options.timeout
)
try:
pb.run()
results = pb.run()
summarize(results)
except errors.AnsibleError, e:
print >>sys.stderr, "ERROR: %s" % e
return 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment