Struggling when passing JSON to --extra-vars
See original GitHub issueHi,
I am trying to run a playbook for which I need to pass a JSON structure to --extra-vars
. The only way I can make this work is when no space is in the argument to --extra-vars
.
This works:
--verbose --tags=some_tag --extra-vars='{"springbootapps":{"appname":{"version":"0.1.17","username":"someuser","urlbase":"https://some.site.com/a/path/to/a/file","nexususer":"someusername","nexuspasswd":"apassword","nexusname":"warname-0.1.17.war"}}}'
Putting a space inside the JSON string (anywhere) results in the plugin to treat it as a new commandline options (I think).
Is there a way to escape the spaces? Allowing spaces would increase legibility, and sometimes, I would need to have spaces inside some value in the JSON string.
Thanks!
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Struggling when passing JSON to --extra-vars #26 - GitHub
Hi, I am trying to run a playbook for which I need to pass a JSON structure to --extra-vars. The only way I...
Read more >Ansible: Invalid JSON when using --extra-vars - Stack Overflow
I have been struggling with an issue in ansible issue for days now. Everything is executed wihtin a Jenkins pipeline. The ansible command...
Read more >Ansible tips'n'tricks: defining –extra-vars as JSON | Martins Blog
Passing parameters as a JSON file You include the JSON file containing all your parameters using the same command line argument, eg –extra-vars...
Read more >Adding arguments to Packer's Ansible provisioner - Server Fault
My Friday brain is really struggling to convert an Ansible command line into the format my Packer .json wants. The Ansible:
Read more >Passing JSON literally inside a string literal - HashiCorp Discuss
Hi, I'm working with the Azure virtual machine extension resource and struggling to pass the JSON object to SETTINGS.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@frozenice Curious if the rundeck plugin system could be enhanced to use multi-value config properties to help this matter. This idea would allow a user to add a list of values. It could work similarly to the multi-value job option.
Hi All,
This is fixed in v2.0.1
Thanks,