Handling module paths
- List the base module path:
root$ puppet config print basemodulepath
- Change the base module path: change the corresponding setting in
/etc/puppet/puppet.conf. The Puppet master daemon has to be restarted to pick up a change. - List the module path of an environment:
root$ puppet config print modulepath --environment <environment_name>
Without--environmentargument, it will print the path of the default one. The module path typically combines an environment specific path with the base module path.
Create a playground file for Puppet
It's often convenient to test Puppet code interactively without having to apply a full configuration. Example applications are testing the execution of a complex command, or testing a complex processing of Facter facts. This can be achieved with a simple Puppet file with the following content:
node default {
<Puppet code to test>
notice("Some message")
}
Assuming the file is called /tmp/test.pp, it can be applied with Puppet using
puppet apply /tmp/test.pp