I am currently running a small puppetmaster + client configuration that is not utilizing Puppet's directory environment feature. My puppet version is 3.6.
I have tried the following:
- On the puppetmaster: added
environmentpath=$confdir/environments
topuppet.conf
- On the puppet master: created the necessary paths in
$confdir/environments/
(e.g./etc/puppet/environments/production
) - Added my existing modules and manifest (
site.pp
) to the production environment - Switched to this git branch and ran a test
puppet agent -vt
on a client
Unfortunately, I am receiving the following error:
Info: Retrieving pluginfacts
Error: /File[/var/lib/puppet/facts.d]: Could not evaluate: Could not retrieve information from environment production source(s) puppet://puppet/pluginfacts
Info: Retrieving plugin
Error: /File[/var/lib/puppet/lib]: Could not evaluate: Could not retrieve information from environment production source(s) puppet://puppet/plugins
Notice: /File[/var/lib/puppet/lib/puppet]: Dependency File[/var/lib/puppet/lib] has failures: true
The puppet run does not fail, but scrolls errors similar to this before completing.
My thought process behind replicating the current configuration (modules and manifests) into the new production
environment is that all clients should have their $environment
variable set to production
by default. Is this flawed logic?
I based my conversion on a Puppet Labs guide.
Best Answer
For posterity's sake, here is the fix I found:
I had made two simple mistakes:
I did not restart the puppetmaster (via passenger). This was easily accomplished with
service apache2 restart
on Debian WheezyUpon restarting, I received a stream of new errors indicating issues with reloading puppet. The logfiles containing pertinent information were eventually found in:
/var/log/syslog
, of all places.The logs indicated an issue with permissions to
/etc/puppet/manifests
. It turns out that git deletes empty folders, and as I had migrated mysite.pp
to/etc/puppet/environments/production/manifests/site.pp
, git removed the/etc/puppet/manifests
folder which threw errors.I fixed #3 by adding an empty
site.pp
to themanifests
folder in/etc/puppet