mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-02 12:14:25 -07:00
Treat module args as strings everywhere to avoid unneccessary shlex and requoting
This commit is contained in:
parent
f11de2f5c9
commit
3ded27fe35
4 changed files with 16 additions and 35 deletions
|
@ -21,7 +21,7 @@ class TestRunner(unittest.TestCase):
|
|||
self.runner = ansible.runner.Runner(
|
||||
module_name='ping',
|
||||
module_path='library/',
|
||||
module_args=[],
|
||||
module_args='',
|
||||
remote_user=self.user,
|
||||
remote_pass=None,
|
||||
host_list='test/ansible_hosts',
|
||||
|
@ -58,7 +58,9 @@ class TestRunner(unittest.TestCase):
|
|||
def _run(self, module_name, module_args, background=0):
|
||||
''' run a module and get the localhost results '''
|
||||
self.runner.module_name = module_name
|
||||
self.runner.module_args = module_args
|
||||
args = ' '.join(module_args)
|
||||
print "DEBUG: using args=%s" % args
|
||||
self.runner.module_args = args
|
||||
self.runner.background = background
|
||||
results = self.runner.run()
|
||||
# when using nosetests this will only show up on failure
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue