Setting up the environment
Environments in Puppet are directories holding different versions of your Puppet manifests. Environments prior to Version 3.6 of Puppet were not a default configuration for Puppet. In newer versions of Puppet, environments are configured by default.
Whenever a node connects to a Puppet master, it informs the Puppet master of its environment. By default, all nodes report to the production
environment. This causes the Puppet master to look in the production environment for manifests. You may specify an alternate environment with the --environment
setting when running puppet agent or by setting environment = newenvironment
in /etc/puppet/puppet.conf
in the [agent] section.
Getting ready
Set the environmentpath
function of your installation by adding a line to the [main]
section of /etc/puppet/puppet.conf
as follows:
[main] ... environmentpath=/etc/puppet/environments
How to do it...
The steps are as follows:
Create a
production
directory at/etc/puppet/environments
that...