Puppet Version: 4.x and above
Puppet Server Version: NA
OS Name/Version: NA
There is some confusion around the proper place to set a Puppet environment in the puppet.conf file. An older (now fixed) bug (
PUP-6739) highlighted problems with placing the environment in the [user] or [agent] section of the puppet.conf. Some documentation (e.g. https://puppet.com/docs/puppet/5.3/config_file_main.html#example-agent-config) shows an example of setting the environment in main, while the defaults.rb file under environment states to not set this globally.
Desired Behavior: Documentation about where to set the Puppet environment in the puppet.conf should be consistent with the code base and what is recommended as well as other existing documentation. **
Defaults.rb has this in the comments under environment:
"Given that the context and effects vary depending on the [config section](https://puppet.com/docs/puppet/latest/config_file_main.html#config-sections) in which the `environment` setting is defined, do not set it globally."