diff options
author | Brian Coca <brian.coca+git@gmail.com> | 2015-11-05 15:55:19 -0500 |
---|---|---|
committer | Brian Coca <brian.coca+git@gmail.com> | 2015-11-05 15:55:19 -0500 |
commit | c64ac90560938811fac4ff32ae69e1e667dddc34 (patch) | |
tree | 68a604ffd33af76df715b7ebda7da91e694110de /lib/ansible/plugins/action/template.py | |
parent | 483c25a6095e8ac7c8cf8d0955ed84859de4a6c3 (diff) | |
download | ansible-c64ac90560938811fac4ff32ae69e1e667dddc34.tar.gz |
fixed check mode change response in template
fixes #13049
Diffstat (limited to 'lib/ansible/plugins/action/template.py')
-rw-r--r-- | lib/ansible/plugins/action/template.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/ansible/plugins/action/template.py b/lib/ansible/plugins/action/template.py index f3d7bc3c4b..42ea11a3ef 100644 --- a/lib/ansible/plugins/action/template.py +++ b/lib/ansible/plugins/action/template.py @@ -151,6 +151,8 @@ class ActionModule(ActionBase): new_module_args = self._task.args.copy() if local_checksum != remote_checksum: + + result['changed'] = True # if showing diffs, we need to get the remote value if self._play_context.diff: diff = self._get_diff_data(dest, resultant, task_vars, source_file=False) @@ -172,11 +174,6 @@ class ActionModule(ActionBase): ), ) result.update(self._execute_module(module_name='copy', module_args=new_module_args, task_vars=task_vars)) - else: - if remote_checksum == '1' or force: - result['changed'] = True - else: - result['changed'] = False if result.get('changed', False) and self._play_context.diff: result['diff'] = diff |