Quote $@ in ansible-playbook-command.sh

ansible-playbook-command.sh should have quotes around $@ so that the
value can be passed through to ansible-playbook with spaces, etc.

Change-Id: I18b387c84d4e942b3088750bc2871b0200e10071
Closes-Bug: #1748965
This commit is contained in:
James Slagle 2018-02-12 14:23:32 -05:00
parent 31578a4763
commit 1c01a8f0df
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
fixes:
- The generated ansible-playbook-command.sh now has quotes around $@ so
that the value can be passed through to ansible-playbook with spaces or
other characters requiring quotes.

View File

@ -462,7 +462,7 @@ class AnsiblePlaybookAction(base.TripleOAction):
f.write('%s="%s"\n' % (var, env_variables[var]))
f.write('\n')
f.write(' '.join(command))
f.write(' $@')
f.write(' "$@"')
f.write('\n')
os.chmod(command_path, 0o750)