mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-13 03:44:02 -07:00
ssh_alt.py / decrease # of ssh roundtrips
This commit is contained in:
parent
db182ba498
commit
7f8863f96d
22 changed files with 160 additions and 49 deletions
|
@ -42,6 +42,7 @@ class Connection(object):
|
|||
def __init__(self, runner, host, port, *args, **kwargs):
|
||||
self.runner = runner
|
||||
self.host = host
|
||||
self.has_pipelining = False
|
||||
# port is unused, this go on func
|
||||
self.port = port
|
||||
|
||||
|
@ -53,9 +54,12 @@ class Connection(object):
|
|||
return self
|
||||
|
||||
def exec_command(self, cmd, tmp_path, sudo_user, sudoable=False,
|
||||
executable='/bin/sh'):
|
||||
executable='/bin/sh', in_data=None):
|
||||
''' run a command on the remote minion '''
|
||||
|
||||
if in_data:
|
||||
raise errors.AnsibleError("Internal Error: this module does not support optimized module pipelining")
|
||||
|
||||
vvv("EXEC %s" % (cmd), host=self.host)
|
||||
p = self.client.command.run(cmd)[self.host]
|
||||
return (p[0], '', p[1], p[2])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue