mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #5551 from jeromew/ansible_ssh_alt
remove useless create/delete remote tmp dir roundtrip in copy module
This commit is contained in:
commit
3ed902eee2
1 changed files with 0 additions and 5 deletions
|
@ -35,8 +35,6 @@ sys.setdefaultencoding("utf8")
|
||||||
|
|
||||||
class ActionModule(object):
|
class ActionModule(object):
|
||||||
|
|
||||||
TRANSFERS_FILES = True
|
|
||||||
|
|
||||||
def __init__(self, runner):
|
def __init__(self, runner):
|
||||||
self.runner = runner
|
self.runner = runner
|
||||||
|
|
||||||
|
@ -125,9 +123,6 @@ class ActionModule(object):
|
||||||
changed = False
|
changed = False
|
||||||
diffs = []
|
diffs = []
|
||||||
module_result = {"changed": False}
|
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:
|
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.
|
# 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)
|
tmp = self.runner._make_tmp_path(conn)
|
||||||
|
|
Loading…
Reference in a new issue