Fixing logic in template.py to not assume 'changed' is in the result

This commit is contained in:
James Cammarata 2015-07-26 13:56:01 -04:00
parent a78ed39f93
commit 034c766439

View file

@ -160,7 +160,7 @@ class ActionModule(ActionBase):
else:
result=dict(changed=True)
if result['changed'] and self._play_context.diff:
if result.get('changed', False) and self._play_context.diff:
result['diff'] = dict(before=dest_contents, after=resultant, before_header=dest, after_header=source)
return result