mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
Pass module arguments as argument instead of keeping it in runner
This commit is contained in:
parent
3939f7a812
commit
34f7e6ffa0
9 changed files with 48 additions and 66 deletions
|
@ -33,15 +33,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 & execute a module that is not 'copy' or 'template' '''
|
||||
|
||||
# shell and command are the same module
|
||||
if module_name == 'shell':
|
||||
module_name = 'command'
|
||||
self.runner.module_args += " #USE_SHELL"
|
||||
module_args += " #USE_SHELL"
|
||||
|
||||
vv("REMOTE_MODULE %s %s" % (module_name, self.runner.module_args), host=conn.host)
|
||||
return self.runner._execute_module(conn, tmp, module_name, self.runner.module_args, inject=inject)
|
||||
vv("REMOTE_MODULE %s %s" % (module_name, module_args), host=conn.host)
|
||||
return self.runner._execute_module(conn, tmp, module_name, module_args, inject=inject)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue