mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Pass module arguments as argument instead of keeping it in runner
This commit is contained in:
@@ -32,16 +32,15 @@ class ActionModule(object):
|
||||
def __init__(self, runner):
|
||||
self.runner = runner
|
||||
|
||||
def run(self, conn, tmp, module_name, inject):
|
||||
def run(self, conn, tmp, module_name, module_args, inject):
|
||||
''' transfer the given module name, plus the async module, then run it '''
|
||||
|
||||
# shell and command module are the same
|
||||
module_args = self.runner.module_args
|
||||
if module_name == 'shell':
|
||||
module_name = 'command'
|
||||
module_args += " #USE_SHELL"
|
||||
|
||||
(module_path, is_new_style) = self.runner._copy_module(conn, tmp, module_name, inject)
|
||||
(module_path, is_new_style) = self.runner._copy_module(conn, tmp, module_name, module_args, inject)
|
||||
self.runner._low_level_exec_command(conn, "chmod a+rx %s" % module_path, tmp)
|
||||
|
||||
return self.runner._execute_module(conn, tmp, 'async_wrapper', module_args,
|
||||
|
||||
Reference in New Issue
Block a user