mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
use shlex.split() instead of split() to keep quoting sane for commands
This commit is contained in:
parent
8d555ff51c
commit
ee95a5b0a4
1 changed files with 2 additions and 1 deletions
|
@ -25,6 +25,7 @@ from optparse import OptionParser
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import getpass
|
import getpass
|
||||||
|
import shlex
|
||||||
import ansible.runner
|
import ansible.runner
|
||||||
import ansible.playbook
|
import ansible.playbook
|
||||||
import ansible.constants as C
|
import ansible.constants as C
|
||||||
|
@ -68,7 +69,7 @@ class Cli(object):
|
||||||
return ansible.runner.Runner(
|
return ansible.runner.Runner(
|
||||||
module_name=options.module_name,
|
module_name=options.module_name,
|
||||||
module_path=options.module_path,
|
module_path=options.module_path,
|
||||||
module_args=options.module_args.split(' '),
|
module_args=shlex.split(options.module_args),
|
||||||
remote_user=options.remote_user,
|
remote_user=options.remote_user,
|
||||||
remote_pass=sshpass,
|
remote_pass=sshpass,
|
||||||
host_list=options.host_list,
|
host_list=options.host_list,
|
||||||
|
|
Loading…
Reference in a new issue