puppetlabs/puppet — pull request #2236 by jeffmccune (2014-01-09 07:59:50+00:00)
Title: Add ability to override default system confdir and vardir

Without this patch it's difficult to change the behavior of determining the
default confdir and vardir settings. This is a problem because it's difficult
to relocate Puppet which is necessary in certain cases, such as Puppet
Enterprise and our Ops team using /etc/operations/puppet as the default
confdir.

This patch exposes a public API to allow third party tools to easily determine
the file to write to override the default confdir and vardir. The API method is
Puppet::Util::RunMode.override_path(type) where type is either "confdir" or
"vardir" An anticipated use case is that a simple rubygems plugin gem could
register a post_install hook to write an override file which will relocate
puppet.

A path relative to the gem source file has been chosen to facilitate multiple
copies of the Puppet library being installed and relocated to their own
isolated paths or gemset.