puppetlabs/puppet-module-tool — pull request #11 by mmrobins (2011-12-01 19:16:30+00:00)
Title: (#10438) Extract installed modules to the module path by default

The current behavior is to only allow the module to install to the
current working directory. This makes the install destination
configurable both from inside your puppet.conf and from the command
line.

There were some concerns about the default being your module path. Here
are those concerns and why it was decided to default to the modulepath
anyway.

Objections
* Installing directly to the module path in production may not be what
you want. However, just installing a module shouldn't do anything
until you actually include it's classes in your manifests.
* The modulepath might have more than one directory in it. We just use
the first one. This will require a PE change so it's modulepath is
useful for this assumption.
* If you're want to download a module to develop it you don't want it in
the module path. I think if you want to develop a module you want to
run it to test it also, and your modulepath will probably already be
version controlled.

Pros
* One of the trickiest things for new users is installing modules to the
right location, and this helps with that a lot.
* Experienced users can configure whatever they want easily from the
command line.

There was some trickiness with getting the settings right from Puppet
since you have to mess with the run_mode global setting and reparse the
settings. The code was already trying to use Puppet settings, but
wasn't dealing with the run_mode correctly, so now the settings that
were already defined should work too.