1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

[patch] Use _make_tmp_path to prevent from copying full patch file path.

This commit is contained in:
Sébastien Gross 2015-03-20 17:13:50 +01:00
parent 8a5f162e29
commit 6888f1ccd9

View file

@ -47,7 +47,10 @@ class ActionModule(object):
else:
src = utils.path_dwim(self.runner.basedir, src)
tmp_src = tmp + src
if tmp is None or "-tmp-" not in tmp:
tmp = self.runner._make_tmp_path(conn)
tmp_src = conn.shell.join_path(tmp, os.path.basename(src))
conn.put_file(src, tmp_src)
if self.runner.become and self.runner.become_user != 'root':