From 6cf3975e2ec4e952c1246dd4100d3e5ec7d934c7 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Mon, 14 Oct 2013 22:08:03 +0300 Subject: [PATCH] copy: Set suitable default result for check mode. --- lib/ansible/runner/action_plugins/copy.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ansible/runner/action_plugins/copy.py b/lib/ansible/runner/action_plugins/copy.py index 9f9da53496..32167e9a7c 100644 --- a/lib/ansible/runner/action_plugins/copy.py +++ b/lib/ansible/runner/action_plugins/copy.py @@ -118,7 +118,7 @@ class ActionModule(object): changed = False diffs = [] - module_result = None + module_result = {"changed": False} for source_full, source_rel in source_files: # We need to get a new tmp path for each file, otherwise the copy module deletes the folder. tmp = self.runner._make_tmp_path(conn) @@ -164,6 +164,8 @@ class ActionModule(object): if content is not None: os.remove(tmp_content) diffs.append(diff) + changed = True + module_result = dict(changed=True) continue