mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 22:33:25 +00:00
ssh_alt.py / decrease # of ssh roundtrips
This commit is contained in:
@@ -19,8 +19,6 @@ from ansible.runner.return_data import ReturnData
|
||||
|
||||
class ActionModule(object):
|
||||
|
||||
TRANSFER_FILES = True
|
||||
|
||||
def __init__(self, runner):
|
||||
self.runner = runner
|
||||
|
||||
@@ -35,6 +33,9 @@ class ActionModule(object):
|
||||
module_name = 'command'
|
||||
module_args += " #USE_SHELL"
|
||||
|
||||
if tmp.find("tmp") == -1:
|
||||
tmp = self.runner._make_tmp_path(conn)
|
||||
|
||||
(module_path, is_new_style, shebang) = self.runner._copy_module(conn, tmp, module_name, module_args, inject, complex_args=complex_args)
|
||||
self.runner._low_level_exec_command(conn, "chmod a+rx %s" % module_path, tmp)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user