mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-01 20:50:23 -07:00
Migrate away from pipes.quote (#56785)
* Migrate away from pipes.quote * Fix sanity
This commit is contained in:
parent
86354ff1fb
commit
3b9478ade0
6 changed files with 54 additions and 54 deletions
|
@ -142,10 +142,10 @@ EXAMPLES = r'''
|
|||
|
||||
import json
|
||||
import os
|
||||
import pipes
|
||||
import stat
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.six.moves import shlex_quote
|
||||
|
||||
|
||||
def _get_facter_dir():
|
||||
|
@ -239,7 +239,7 @@ def main():
|
|||
if TIMEOUT_CMD:
|
||||
base_cmd = "%(timeout_cmd)s -s 9 %(timeout)s %(puppet_cmd)s" % dict(
|
||||
timeout_cmd=TIMEOUT_CMD,
|
||||
timeout=pipes.quote(p['timeout']),
|
||||
timeout=shlex_quote(p['timeout']),
|
||||
puppet_cmd=PUPPET_CMD)
|
||||
else:
|
||||
base_cmd = PUPPET_CMD
|
||||
|
@ -249,7 +249,7 @@ def main():
|
|||
" --no-daemonize --no-usecacheonfailure --no-splay"
|
||||
" --detailed-exitcodes --verbose --color 0") % dict(base_cmd=base_cmd)
|
||||
if p['puppetmaster']:
|
||||
cmd += " --server %s" % pipes.quote(p['puppetmaster'])
|
||||
cmd += " --server %s" % shlex_quote(p['puppetmaster'])
|
||||
if p['show_diff']:
|
||||
cmd += " --show_diff"
|
||||
if p['environment']:
|
||||
|
@ -289,7 +289,7 @@ def main():
|
|||
if p['execute']:
|
||||
cmd += " --execute '%s'" % p['execute']
|
||||
else:
|
||||
cmd += pipes.quote(p['manifest'])
|
||||
cmd += shlex_quote(p['manifest'])
|
||||
if p['summarize']:
|
||||
cmd += " --summarize"
|
||||
if p['debug']:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue