ssh_alt.py / decrease # of ssh roundtrips

This commit is contained in:
jeromew 2013-12-11 04:55:56 -05:00
commit 5c965a75f0
23 changed files with 175 additions and 57 deletions

View file

@ -37,6 +37,7 @@ class Connection(object):
def __init__(self, runner, host, port, *args, **kwargs):
self.runner = runner
self.has_pipelining = False
# attempt to work around shared-memory funness
if getattr(self.runner, 'aes_keys', None):
@ -67,9 +68,12 @@ class Connection(object):
return self
def exec_command(self, cmd, tmp_path, sudo_user, sudoable=False, executable='/bin/sh'):
def exec_command(self, cmd, tmp_path, sudo_user, sudoable=False, executable='/bin/sh', in_data=None):
''' run a command on the remote host '''
if in_data:
raise errors.AnsibleError("Internal Error: this module does not support optimized module pipelining")
vvv("EXEC COMMAND %s" % cmd)
if self.runner.sudo and sudoable: