From 78bcedc36e30dcfa335db6a1756e7c89f9f8e748 Mon Sep 17 00:00:00 2001 From: cloudnull Date: Tue, 5 Feb 2019 00:13:12 -0600 Subject: [PATCH] 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 --- action/config_template.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/action/config_template.py b/action/config_template.py index 2698f27..d9c97e2 100644 --- a/action/config_template.py +++ b/action/config_template.py @@ -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(