Merge pull request #10507 from renard/fix-patch-action-plugin
Fix patch action plugin
This commit is contained in:
commit
f6714ac051
1 changed files with 5 additions and 2 deletions
|
@ -32,7 +32,7 @@ class ActionModule(object):
|
|||
|
||||
src = options.get('src', None)
|
||||
dest = options.get('dest', None)
|
||||
remote_src = utils.boolean(options.get('remote_src', 'yes'))
|
||||
remote_src = utils.boolean(options.get('remote_src', 'no'))
|
||||
|
||||
if src is None:
|
||||
result = dict(failed=True, msg="src is required")
|
||||
|
@ -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':
|
||||
|
|
Loading…
Reference in a new issue