From 69febcefde6a075c9392be94c5b69d7a4bc974f0 Mon Sep 17 00:00:00 2001 From: jeromew Date: Wed, 8 Jan 2014 15:22:12 +0000 Subject: [PATCH] remove useless create/delete remote tmp dir roundtrip in copy module --- lib/ansible/runner/action_plugins/copy.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/ansible/runner/action_plugins/copy.py b/lib/ansible/runner/action_plugins/copy.py index e493e7abf4b..6cff391d502 100644 --- a/lib/ansible/runner/action_plugins/copy.py +++ b/lib/ansible/runner/action_plugins/copy.py @@ -35,8 +35,6 @@ sys.setdefaultencoding("utf8") class ActionModule(object): - TRANSFERS_FILES = True - def __init__(self, runner): self.runner = runner @@ -125,9 +123,6 @@ class ActionModule(object): changed = False diffs = [] module_result = {"changed": False} - # Remove tmp path since a new one is created below. Should be empty. - if tmp.find("tmp") != -1: - self.runner._low_level_exec_command(conn, "rm -rf %s > /dev/null 2>&1" % tmp, tmp) for source_full, source_rel in source_files: # We need to get a new tmp path for each file, otherwise the copy module deletes the folder. tmp = self.runner._make_tmp_path(conn)