You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 12, 2019. It is now read-only.
It would be nice for Spiceweasel to have the ability to dynamically replace variables at runtime.
For example, it would be nice to be able to set a Spiceweasel variable "password" to "mysecret123" and use a replacement string throughout the rest of the manifest file. Furthermore, it would also be nice to have the ability to not only define key/value pairs for variables, but also to define key/special_value variables that allow prompting the user at runtime (eg: prompting for a sensitive password that cannot be stored in plaintext).
As a possible path to take (assuming 2 special strings, prompt_for_password (no echo) and prompt_for_text (echo)):
I just tested, that if you use the ruby style of spiceweasel configurations, you can do ruby stuff which includes effectively the things you are discussing (I didn't try prompting but I presume it would work)
For instance I wanted to set attributes inside of the spiceweasel config file and not in roles but I didn't want to embed json directly in the cluster option lines. So I did:
and then in the related cluster section I used ruby string interpolation #{pod_attributes.to_json} to expand that out in the options . Note that the spiceweasel {{n}} mechanism for embedding the index of the instance still works too:
The main problem is if there is any syntax errors you get a rather meaningless error. I may get around to adding some stuff and do a pull request but probably not soon since I'm going to be away for a couple of weeks.
It would be nice for Spiceweasel to have the ability to dynamically replace variables at runtime.
For example, it would be nice to be able to set a Spiceweasel variable "password" to "mysecret123" and use a replacement string throughout the rest of the manifest file. Furthermore, it would also be nice to have the ability to not only define key/value pairs for variables, but also to define key/special_value variables that allow prompting the user at runtime (eg: prompting for a sensitive password that cannot be stored in plaintext).
As a possible path to take (assuming 2 special strings, prompt_for_password (no echo) and prompt_for_text (echo)):
The text was updated successfully, but these errors were encountered: