Commit 025402c0 by Michael DeHaan

Merge pull request #1507 from lorin/pretty-print-msg

Pretty-print "msg" when task fails
parents 4cc1ff4b 1c5ac5ca
......@@ -314,6 +314,7 @@ class PlaybookRunnerCallbacks(DefaultRunnerCallbacks):
module_msg = results2.pop('msg', None)
stderr = results2.pop('stderr', None)
stdout = results2.pop('stdout', None)
returned_msg = results2.pop('msg', None)
if item:
msg = "failed: [%s] => (item=%s) => %s" % (host, item, utils.jsonify(results2))
......@@ -325,6 +326,8 @@ class PlaybookRunnerCallbacks(DefaultRunnerCallbacks):
print stringc("stderr: %s" % stderr, 'red')
if stdout:
print stringc("stdout: %s" % stdout, 'red')
if returned_msg:
print stringc("msg: %s" % returned_msg, 'red')
if not parsed and module_msg:
print stringc("invalid output was: %s" % module_msg, 'red')
if ignore_errors:
......
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