octocatalog-diff
octocatalog-diff copied to clipboard
How to use a different puppet configuration (e.g. strict_variables)
Hey, I have set strict_variables
(https://puppet.com/docs/puppet/4.10/configuration.html#strictvariables) to true on the puppetmaster. Now I also want this setting to be there for the octocatalog-diff run. Unfortunately I couldn't figure out how I could do that. The only think I could think of would be to add a bootstrapping script which creates a puppet.conf with that setting. But this doesn't feel right :)
Does someone has an idea how I could do that?
Most (all) puppet config settings can also be set on the command line, so I think --command-line
(or --from-command-line
, --to-command-line
) will probably do what you need.
See options reference for more info.
@kpaulisse thank you for your answer. But you can't set strict_variables
on the command line (and also not for octocatalog-diff).
😿 OK, didn't realize it wasn't a command line option.
The need would then seem to be creating a custom puppet.conf file to be used when Puppet is run by octocatalog-diff that contains the unsettable variables. I'll re-tag this as an enhancement request. Thanks for the clarification!
@mookie- for me
puppet apply --strict_variables -e 'notify { "bla $doesnotexist": }'
puppet apply -e 'notify { "bla $doesnotexist": }'
works as expected:
$ puppet apply --strict_variables -e 'notify { "bla $doesnotexist": }'
Error: Evaluation Error: Unknown variable: 'doesnotexist'. (line: 1, column: 15) on node 79a996617dea
$ puppet apply -e 'notify { "bla $doesnotexist": }'
Warning: Unknown variable: 'doesnotexist'. (line: 1, column: 15)
Notice: Compiled catalog for 79a996617dea in environment production in 0.05 seconds
Notice: bla
Notice: /Stage[main]/Main/Notify[bla ]/message: defined 'message' as 'bla '
Notice: Applied catalog in 0.01 seconds