1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

copy: Set suitable default result for check mode.

This commit is contained in:
Paul Sokolovsky 2013-10-14 22:08:03 +03:00
parent 612b446856
commit 6cf3975e2e

View file

@ -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