Ask Your Question

Directory-based envs and modules

asked 2014-10-02 04:00:09 -0500

lex gravatar image

Hello, i tried re-configuring my test env to directory-based environments and everything seems to be working, except modules. My puppet conf:

  pluginsync = true
  environmentpath = $confdir/environments
  default_manifest = $confdir/manifests

  reports = log, foreman
  foreman_url =
  reporturl =
  external_nodes = /etc/puppet/node.rb
  node_terminus = exec

  server =
  report = true
  ignorecache = true
  use_cached_catalog = false

My environment conf for "development"

manifest = /etc/puppet/environments/development/site.pp
modulepath = site:dist:modules:$basemodulepath:/etc/puppet/modules

Upon further investigation, i noticed that modulepath is not present under "puppet" user:

lex@puppet > sudo -u puppet puppet master --configprint all | grep module
basemodulepath = /var/lib/puppet/.puppet/modules:/usr/share/puppet/modules
module_groups =
module_repository =
module_skeleton_dir = /var/lib/puppet/.puppet/var/puppet-module/skeleton
module_working_dir = /var/lib/puppet/.puppet/var/puppet-module
modulepath = /var/lib/puppet/.puppet/modules:/usr/share/puppet/modules
lex@puppet > ps aux | grep master
puppet    2981  0.0  4.1 135104 42092 ?        Ssl  Sep29   0:13 /usr/bin/ruby /usr/bin/puppet master --masterport=

I'm running puppet 3.7.1, foreman 1.6 for reporting, puppetmaster is running under apache mod_passenger.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-10-08 02:30:02 -0500

Ancillas gravatar image

Enabling directory environments completely disables configured environments. In addition, modulepath has no effect when directory environments are enabled.

Use basemodulepath to set the path to centralized modules that are shared between all environments. Otherwise, modules must be placed in <environment_dir>/modules/.

Here's the doc.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-10-02 04:00:09 -0500

Seen: 188 times

Last updated: Oct 08 '14