A collection of task oriented solutions in Puppet

 

Show Puppet Config Settings

Challenge

How do I find the value of a config setting in puppet?

Solution

# show the value of a single setting
$ puppet --configprint modulepath
/home/dean/.puppet/modules:/usr/share/puppet/modules

# show all config settings
$ puppet --configprint all

Explanation

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 --configprint modulepath with either the setting you're interested in or the argument "all" to all the current settings.

You should run the --configprint commands as the user that puppet runs as to avoid receiving information based on your user account:

# as me
$ puppet --configprint modulepath
/home/dwilson/.puppet/modules:/usr/share/puppet/modules

# as the root user - which puppet runs as on this system
$ sudo puppet --configprint modulepath
/etc/puppet/modules:/usr/share/puppet/modules