How do I find the value of a config setting in puppet?
# show the value of a single setting
# this defaults to the [main] part of puppet.conf
$ puppet config print modulepath
/etc/puppet/modules
# show the value of a single setting from [master]
$ puppet config print --section master modulepath
/etc/puppet/modules
# show all config setting values
$ puppet config print
# can also be more explicit
$ puppet config print all
# show all config settings and explanations
sudo puppet master --genconfig
... snip ...
# Whether to print a transaction summary.
# summarize = false
... snip ...
Sometimes you just need to know what puppet 'thinks' the value of a
setting actually is. The easiest way to find this is to ask puppet
directly by running puppet config print modulepath
with either the
setting you're interested in, modulepath
in this case, or with no arguments
(or all
) to list all the settings and their values
You should run the config print
commands as the user that puppet runs
as to avoid receiving information based on your user account:
# as me
$ puppet config print modulepath
/home/dwilson/.puppet/modules:/usr/share/puppet/modules
# as the root user - which puppet runs as on this system
$ puppet config print modulepath
$ sudo puppet --configprint modulepath
/etc/puppet/modules:/usr/share/puppet/modules
If you want more details, such as an explanation of each of the config settings
you can run sudo puppet master --genconfig
and it will include a description
and the default value of the setting. Between these commands you should be able
to determine exactly what puppet is doing, no matter what differences there
are in operating system platforms or local overrides.