How to pass single value extra-vars to a Play at runtime? #2393
openstreem
started this conversation in
General
Replies: 1 comment 2 replies
-
it looks like a bug. I will try to reproduce this. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I've been trying to pass a single value extra-var to my Play. It points to a YAML file:, for example: "@vault.yml".
You can't define it in the Environment as the var must be a JSON key/value.
I've tried configuring [ "--extra-vars", "@vault.yml" ] in the "Args" box. I just receive the error "ERROR! the playbook: [ "--extra-vars","@vault.yml" ] could not be found".
If I leave the "Args" box empty and add [ "--extra-vars", "@vault.yml" ] to the "Advanced -> CLI Arguments" box, the Play will run normally.
My question:
Is there a way to add my JSON structure to the "Args" box, or, make the "Advanced -> CLI Arguments" box persistent?
I have to execute the Play in this fashion because some of my tasks utilize sudo, and I don't want sudoers to set NOPASSWD for ALL users.
Assistance would be greatly appreciated. This is a show-stopper for me as I'd really like to use Semaphore in lieu of other tools. However, I need to be able to kick off Plays like this automatically and not by inputting a parameter manually at runtime.
Thanks for your thoughts and ideas!
Beta Was this translation helpful? Give feedback.
All reactions