mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-13 11:49:11 -07:00
ssh_alt.py / decrease # of ssh roundtrips
This commit is contained in:
parent
dc41912158
commit
5c965a75f0
23 changed files with 175 additions and 57 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue