Correct "changed" to work with the latest ansible

This commit adds a check for "changed" in the return from the copy
module. If the value is not possitive `rc['changed']` will be set
with the constant "changed" from within the action plugin.

Change-Id: Id65e6e57d174c4c25d99836b09ad049302d4e42c
Signed-off-by: cloudnull <kevin@cloudnull.com>
This commit is contained in:
cloudnull 2019-02-05 00:13:12 -06:00
parent f4b38b5987
commit 78bcedc36e
No known key found for this signature in database
GPG Key ID: 9443251A787B9FB3
1 changed files with 3 additions and 1 deletions

View File

@ -831,8 +831,10 @@ class ActionModule(ActionBase):
module_args=new_module_args,
task_vars=task_vars
)
copy_changed = rc.get('changed')
if not copy_changed:
rc['changed'] = changed
rc['changed'] = changed
if self._play_context.diff:
rc['diff'] = []
rc['diff'].append(