Merge "Quote kolla limit when calling kolla-ansible"
This commit is contained in:
commit
a4919e1877
@ -132,7 +132,7 @@ def build_args(parsed_args, command, inventory_filename, extra_vars=None,
|
||||
cmd += ["-e", "%s=%s" % (extra_var_name, extra_var_value)]
|
||||
if parsed_args.kolla_limit or limit:
|
||||
limit_arg = utils.intersect_limits(parsed_args.kolla_limit, limit)
|
||||
cmd += ["--limit", limit_arg]
|
||||
cmd += ["--limit", utils.quote_and_escape(limit_arg)]
|
||||
if parsed_args.kolla_skip_tags:
|
||||
cmd += ["--skip-tags", parsed_args.kolla_skip_tags]
|
||||
if parsed_args.kolla_tags or tags:
|
||||
|
@ -69,7 +69,7 @@ class TestCase(unittest.TestCase):
|
||||
"--configdir", "/path/to/config",
|
||||
"--passwords", "/path/to/config/passwords.yml",
|
||||
"-e", "ev_name1=ev_value1",
|
||||
"--limit", "host1:host2",
|
||||
"--limit", "'host1:host2'",
|
||||
"--tags", "tag1,tag2",
|
||||
]
|
||||
expected_cmd = " ".join(expected_cmd)
|
||||
@ -105,7 +105,7 @@ class TestCase(unittest.TestCase):
|
||||
"--configdir", "/path/to/config",
|
||||
"--passwords", "/path/to/config/passwords.yml",
|
||||
"-e", "ev_name1=ev_value1",
|
||||
"--limit", "host1:host2",
|
||||
"--limit", "'host1:host2'",
|
||||
"--skip-tags", "tag3,tag4",
|
||||
"--tags", "tag1,tag2",
|
||||
]
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixes calls to ``kolla-ansible`` when arguments to ``--kolla-limit``
|
||||
contain special characters such as ``~`` or ``&``.
|
Loading…
Reference in New Issue
Block a user