puppetlabs-image_build
puppetlabs-image_build copied to clipboard
Allow specifying of facter variables during puppet apply.
Sometimes you want to push additional variables to facter during puppet apply. For instance, secrets should not be stored under version control but are needed when the configuration is applied. In this instance using passing the secret as a facter variable to puppet is a nice way of having the configured machine have the secret but not include the secret in your source code.
This patch lets you specify facter variables at parameters to
puppet docker build that are in turn sent to the puppet apply call.
Hey @garethr , do you mind taking a look at this PR when you get time? TY!
Hi @garethr. Sorry to nag, but I don't suppose you could take a look at this if you get some time? TY!
@oc243 thanks for the suggestion, and sorry for the delay.
Is there a reason for having this separate to just passing environment variables?
https://github.com/puppetlabs/puppetlabs-image_build/blob/master/lib/puppet_x/puppetlabs/imagebuilder_face.rb#L61
The extra flag isn't something that's standard to other puppet tools, and their is also the case of passing env and passing the new variable and one winning. Would be interested in your thoughts.
Is there a reason for having this separate to just passing environment variables?
D'oh! Yes, that's much easier.
There might be some advantage of limiting the scope of the environment variables to only exist in the puppet apply command. That said, one is not sure if that is worth the additional complexity given that it's possible no-one would use this…