I am trying to set up dynamic environments using http://puppetlabs.com/blog/git-workflow-and-puppet-environments/ as a guide. Unfortunately I am not entirely clear on what I am doing.

I have created a directory on the puppet master at /etc/puppetlabs/puppet/environments/

I have copied the configuration examples from the document above to the puppet.conf file on my puppet master. I added the three lines in each section of the document to the respective section of the puppet.conf file, and made changes to suit my system (paths, etc...) Prior to these changes I was working with the default-post-installation copy of puppet.conf

now when I try to run puppet agent -t --noop from a client machine, or from the server I get the following error.

err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class pe_compliance for puppet-test-01.mydomain.net on node puppet-test-01.mydomain.net
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run

If I get rid of all that stuffs and put in an enviornment manually in the puppet.conf file on the master, then I can add environment = testenv to the puppet.conf file on the client and I think I get a new environment... but I don't see any such thing in the web UI... so I don't know for sure if this is working either.

What am I doing worng? what do I need to do next

  • // , See if you can use some of the answers to flesh this out into a more specific question. That way, people who come across this later can find a way to frame the way they see the problem in their mind. Nov 30, 2015 at 20:59

1 Answer 1


In Puppet Enterprise there are a number of modules that must be present for things to work properly.

You will need to either copy them into the $modulepath for every environment, OR add the default path into the per environment path.

The default modulepath for Puppet Enterprise is (according to documentation) /etc/puppetlabs/puppet/modules:/opt/puppet/share/puppet/modules.

You will need to add this to your environments, such as:

modulepath = /etc/puppet/environments/production/modules:/etc/puppetlabs/puppet/modules:/opt/puppet/share/puppet/modules

I would recommend just using a single modulepath set in your [master] section, as follows:

modulepath = $confdir/environments/$environment/modules:/etc/puppetlabs/puppet/modules:/opt/puppet/share/puppet/modules

Not only does this mean less for you to type in the config file, it also makes it trivial to add a new environment should you need to. And by leaving the default modulepath in place, you don't have to copy all the PE specific modules into each and every environment.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .