From 2ccfc8d2b661cd21b50ff8453e81279216b2717f Mon Sep 17 00:00:00 2001 From: Matt Cordial Date: Fri, 8 Feb 2013 12:03:54 -0700 Subject: [PATCH] Fix Issue #2025 where templates were not being transfered. --- lib/ansible/runner/action_plugins/template.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ansible/runner/action_plugins/template.py b/lib/ansible/runner/action_plugins/template.py index 4e533c2ced..e714bad531 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 = None if self.runner.diff: # using persist_files to keep the temp directory around to avoid needing to grab another dest_result = self.runner._execute_module(conn, tmp, 'slurp', "path=%s" % dest, inject=inject, persist_files=True) @@ -92,7 +92,7 @@ class ActionModule(object): else: raise Exception("unknown encoding, failed: %s" % dest_result.result) - xfered = self.runner._transfer_str(conn, tmp, source, resultant) + xfered = self.runner._transfer_str(conn, tmp, 'source', resultant) # fix file permissions when the copy is done as a different user if self.runner.sudo and self.runner.sudo_user != 'root': @@ -100,7 +100,7 @@ class ActionModule(object): # run the copy module module_args = "%s src=%s dest=%s" % (module_args, xfered, dest) - + if self.runner.check: if self.runner.diff: self.runner.callbacks.on_file_diff(conn.host, dest_contents, resultant)