question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Struggling when passing JSON to --extra-vars

See original GitHub issue

Hi,

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:closed
  • Created 7 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
ahonorcommented, May 12, 2016

@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.

0reactions
yassineazzouzcommented, Oct 15, 2016

Hi All,

This is fixed in v2.0.1

Thanks,

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found