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.
This commit is contained in:
Michael DeHaan 2012-08-16 21:44:59 -04:00
parent c93df29249
commit 0579b8b4e6

View file

@ -140,7 +140,7 @@ def host_report_msg(hostname, module_name, result, oneline):
failed = utils.is_failed(result)
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:
msg = command_generic_msg(hostname, result, oneline, 'success')
else: