Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Directory-based envs and modules

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

    [main]
  logdir=/var/log/puppet
  vardir=/var/lib/puppet
  ssldir=/var/lib/puppet/ssl
  rundir=/var/run/puppet
  factpath=$vardir/lib/facter
  pluginsync = true
  environmentpath = $confdir/environments
  default_manifest = $confdir/manifests

[master]
  reports = log, foreman
  foreman_url = https://puppet.srv.host/
  reporturl = https://puppet.srv.host/reports/upload
  external_nodes = /etc/puppet/node.rb
  node_terminus = exec

[agent]
  server = puppet.srv.host
  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 = https://forgeapi.puppetlabs.com
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.