ssh_alt.py / decrease # of ssh roundtrips

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

View file

@ -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)