Puppet : set a variable only at runtime
I'm currently facing an interesting challenge :
- I use puppet to setup a middleware
- in order to be able to use this middleware once it's installed, I need to query it in order to get a ( unique ) key
- once I have this key, I can use it in order to configure other products depending on this middleware
The problem :
- I use templates in order to deliver the configuration for the products depending on the middleware, but these use static hiera configuration files in order to resolve the variables
How can I inject ( in a template ), a value ( this unique key ) which is unknown until a certain point in the puppet deployment ?
Thanks beforehand for any answer.