Merge pull request #6658 from pilou-/fix_fix

'changed' key is not defined when task fails
This commit is contained in:
Michael DeHaan 2014-03-25 11:49:18 -04:00
commit a062912a1f

View file

@ -123,7 +123,7 @@ class ActionModule(object):
return ReturnData(conn=conn, comm_ok=True, result=dict(changed=True), diff=dict(before_header=dest, after_header=source, before=dest_contents, after=resultant))
else:
res = self.runner._execute_module(conn, tmp, 'copy', module_args, inject=inject, complex_args=complex_args)
if res.result['changed']:
if res.result.get('changed', False):
res.diff = dict(before=dest_contents, after=resultant)
return res
else: