From eed32ea70ce7fcd850f10ef174c48daad91407a7 Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Thu, 28 Nov 2013 10:59:51 +1000 Subject: [PATCH] =?UTF-8?q?dest=5Fcontents=20isn=E2=80=99t=20always=20defi?= =?UTF-8?q?ned,=20so=20don=E2=80=99t=20pass=20it=20around?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I think this is also a bit of a hack since it should probably be set before being used, I’m just not sure what it should be set to. --- lib/ansible/runner/action_plugins/assemble.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/runner/action_plugins/assemble.py b/lib/ansible/runner/action_plugins/assemble.py index aeabc0d4cae..ad6caf3c6f8 100644 --- a/lib/ansible/runner/action_plugins/assemble.py +++ b/lib/ansible/runner/action_plugins/assemble.py @@ -90,10 +90,10 @@ class ActionModule(object): module_args = "%s src=%s dest=%s original_basename=%s" % (module_args, pipes.quote(xfered), pipes.quote(dest), pipes.quote(os.path.basename(src))) if self.runner.noop_on_check(inject): - return ReturnData(conn=conn, comm_ok=True, result=dict(changed=True), diff=dict(before_header=dest, after_header=src, before=dest_contents, after=resultant)) + return ReturnData(conn=conn, comm_ok=True, result=dict(changed=True), diff=dict(before_header=dest, after_header=src, after=resultant)) else: - res.diff = dict(before=dest_contents, after=resultant) res = self.runner._execute_module(conn, tmp, 'copy', module_args, inject=inject) + res.diff = dict(after=resultant) return res else: module_args = "%s src=%s dest=%s original_basename=%s" % (module_args, pipes.quote(xfered), pipes.quote(dest), pipes.quote(os.path.basename(src)))