How do I store the result of running an executable in a puppet variable?
I'm using puppet to manage an IPython notebook deployment. I need to execute some python code to generate a salt+hash from a plaintext password, which is a puppet variable. I want to then store this salt+hash in a different variable so that it is available for use within a template.
How do I assign "stdout" from the exec {}
to a puppet variable?
EDIT: The answers exposed an unstated assumption in my original question: I want to run code outside of puppet on a node under puppet control, and then assign stdout to a puppet variable for use in the remainder of the puppet run. The rationale being I need puppet to make sure that the code I need to run is present on the machine running it.
Ah, I didn't parse the "exec {}" part correctly, and of course, functions only run on the master, not the client.