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

Fix diff when template destination is absent

This commit is contained in:
Stoned Elipot 2013-02-26 16:45:56 +01:00
parent 10e9f1fc1e
commit 1b8c9bab35

View file

@ -82,7 +82,7 @@ class ActionModule(object):
# template is different from the remote value # template is different from the remote value
# if showing diffs, we need to get the remote value # if showing diffs, we need to get the remote value
dest_contents = None dest_contents = ''
if self.runner.diff: if self.runner.diff:
# using persist_files to keep the temp directory around to avoid needing to grab another # using persist_files to keep the temp directory around to avoid needing to grab another
@ -93,8 +93,6 @@ class ActionModule(object):
dest_contents = base64.b64decode(dest_contents) dest_contents = base64.b64decode(dest_contents)
else: else:
raise Exception("unknown encoding, failed: %s" % dest_result.result) raise Exception("unknown encoding, failed: %s" % dest_result.result)
else:
dest_result = ''
xfered = self.runner._transfer_str(conn, tmp, 'source', resultant) xfered = self.runner._transfer_str(conn, tmp, 'source', resultant)