mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge pull request #49966 from thebluesnevrdie/ansible-playbook-extra-vars-fix
Fix quoting issue when passing extra_vars to ansible-playbook
This commit is contained in:
commit
16ed58ae3f
@ -333,7 +333,7 @@ def playbooks(playbook, rundir=None, check=False, diff=False, extra_vars=None,
|
|||||||
if diff:
|
if diff:
|
||||||
command.append('--diff')
|
command.append('--diff')
|
||||||
if isinstance(extra_vars, dict):
|
if isinstance(extra_vars, dict):
|
||||||
command.append('--extra-vars={0}'.format(json.dumps(extra_vars)))
|
command.append("--extra-vars='{0}'".format(json.dumps(extra_vars)))
|
||||||
elif isinstance(extra_vars, six.text_type) and extra_vars.startswith('@'):
|
elif isinstance(extra_vars, six.text_type) and extra_vars.startswith('@'):
|
||||||
command.append('--extra-vars={0}'.format(extra_vars))
|
command.append('--extra-vars={0}'.format(extra_vars))
|
||||||
if flush_cache:
|
if flush_cache:
|
||||||
|
Loading…
Reference in New Issue
Block a user