Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove useless create/delete remote tmp dir roundtrip in copy module #5551

Merged
merged 1 commit into from
Jan 8, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions lib/ansible/runner/action_plugins/copy.py
Expand Up @@ -35,8 +35,6 @@

class ActionModule(object):

TRANSFERS_FILES = True

def __init__(self, runner):
self.runner = runner

Expand Down Expand Up @@ -125,9 +123,6 @@ def run(self, conn, tmp, module_name, module_args, inject, complex_args=None, **
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)
Expand Down