terrimonster/puppet-control — pull request #5 by awaxa (2014-11-18 21:06:07+00:00)
Title: Vagrant remote

I've been debating the pros and cons of this with myself for the last couple hours...

#### good
* xmaster will be configured much more similarly to production masters
* no more need to conditionally set paths or shoehorn `/vagrant` in front of them

#### slightly annoying
* The full r10k/git workflow becomes necessary with the vagrant environment. I think the extra workflow practice would be good for new r10k users, though.

#### alternatives
While it would be nice to be able to test un-committed changes in the vagrant environment, I can't think of a way to cleanly override the `environment.conf` modulepath.

Currently, `profile::puppet::master` is prepending `/vagrant/site` to the default `basemodulepath`. This unfortunately results in modulepaths with `/vagrant/site` in the middle due to `environment.conf` appending `$basemodulepath` to the environment modulepath.

My best idea is to add a long-lived branch to this repository containing *nothing* but an environment.conf file setting `manifest` and `modulepath`, then configure the puppet environment for vagrant hosts via hiera or other conditional logic. Unfortunately setting the modulepath complicates things further.
* using `/vagrant/modules` would require engineers to `r10k puppetfile install` to test changes to the `Puppetfile`
* using `$confdir/environments/$environment/modules` would prevent changes to the `Puppetfile` from being effected in the vagrant environment

The hieradata directory would also need to be determined conditionally with some of the code that 2dfb8e0 removes. I think this would be enough to facilitate testing without commiting, but it feels dirty. Is there a better way to handle this?