Commit 0579b8b4 by Michael DeHaan

The command module was not reporting on errors like the other modules when the module failed

to parse or return other valid output.  This is a slight improvement.
parent c93df292
...@@ -140,7 +140,7 @@ def host_report_msg(hostname, module_name, result, oneline): ...@@ -140,7 +140,7 @@ def host_report_msg(hostname, module_name, result, oneline):
failed = utils.is_failed(result) failed = utils.is_failed(result)
msg = '' msg = ''
if module_name in [ 'command', 'shell', 'raw' ] and 'ansible_job_id' not in result: if module_name in [ 'command', 'shell', 'raw' ] and 'ansible_job_id' not in result and result.get('parsed',True) != False:
if not failed: if not failed:
msg = command_generic_msg(hostname, result, oneline, 'success') msg = command_generic_msg(hostname, result, oneline, 'success')
else: else:
......
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