From 6f5d1456bcb8857f6c80ea4def0ba4c9b23e61c3 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Fri, 3 Jun 2016 12:32:15 -0700 Subject: [PATCH] Fix the copy action to not send the content as a param. (#16127) Has already been transferred as a tempfile. This fixes the error in https://github.com/ansible/ansible/issues/16125 but there may be higher level issues that should be fixed as well (other modules might be able to cause status fields like failed and changed to return a censored string instead of a bool). So leaving 16125 open for now. --- lib/ansible/plugins/action/copy.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/plugins/action/copy.py b/lib/ansible/plugins/action/copy.py index 1c40e0a4e03..4e7cc263064 100644 --- a/lib/ansible/plugins/action/copy.py +++ b/lib/ansible/plugins/action/copy.py @@ -245,6 +245,8 @@ class ActionModule(ActionBase): original_basename=source_rel, ) ) + if 'content' in new_module_args: + del new_module_args['content'] module_return = self._execute_module(module_name='copy', module_args=new_module_args, task_vars=task_vars, tmp=tmp, delete_remote_tmp=delete_remote_tmp) module_executed = True