From 1b8c9bab35de108c271f91edbc47fdd9d87c8ed6 Mon Sep 17 00:00:00 2001 From: Stoned Elipot Date: Tue, 26 Feb 2013 16:45:56 +0100 Subject: [PATCH] Fix diff when template destination is absent --- lib/ansible/runner/action_plugins/template.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/ansible/runner/action_plugins/template.py b/lib/ansible/runner/action_plugins/template.py index 0f93947a56..0edef20b97 100644 --- a/lib/ansible/runner/action_plugins/template.py +++ b/lib/ansible/runner/action_plugins/template.py @@ -82,7 +82,7 @@ class ActionModule(object): # template is different from the remote value # if showing diffs, we need to get the remote value - dest_contents = None + dest_contents = '' if self.runner.diff: # 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) else: raise Exception("unknown encoding, failed: %s" % dest_result.result) - else: - dest_result = '' xfered = self.runner._transfer_str(conn, tmp, 'source', resultant)