# puppet module list
/usr/share/puppet/modules (no modules installed)# puppet module --confdir=/etc/puppet/environments/production/modules:/usr/share/puppet/modules list
/etc/puppet/environments/production/modules
├── apache (???)
├── awstats (???)
etc.[main]
certname=kmadmin102
dns_alt_names=kmadmin102.vistaprint.net,test-kmpuppet,test-kmpuppet.vistaprint.net,kmadmin102.vistaprint.net
logdir = /var/log/puppet/
rundir = /var/run/puppet
ssldir = $vardir/ssl
pluginsync = true
certificate_revocation = false
report = false
configtimeout = 4m
environmentpath = $confdir/environments
default_manifest = $confdir/manifests
basemodulepath = $confdir/modules:/usr/share/puppet/modules
[agent]
classfile = $vardir/classes.txt
localconfig = $vardir/localconfig
[master]Hi all,I am running a puppetmaster setup on CentOS. We have out production environment working fine. However, I am trying to migrate from puppet 3.4, and from config environments to directory environments. I got my environments tree all set up in the puppet master, but when I activate my directory environments, puppetmaster suddently can't see any modules or manifests -- it runs, but returns empty catalog for the agent, and 'puppet modules list' says I have no modules installed:# puppet module list
/usr/share/puppet/modules (no modules installed)
None of the other global config files contain anything that references environments. My environment directory is set up correctly (it works on our production puppetmaster), and it works when I point the puppetmaster at it explicitly:# puppet module --confdir=/etc/puppet/environments/production/modules:/usr/share/puppet/modules list
/etc/puppet/environments/production/modules
├── apache (???)
├── awstats (???)
etc.
puppet module --confdir=/etc/puppet list
Can someone see what I am doing wrong?
puppet module list --environment=production/etc/puppet
- /modules (root modules, stuff downloaded from puppet forge)
- /manifests (Empty on purpose. Directory environments define my nodes now.)
- /environments
- /test01
- /test02
- /manifests
- site.pp
- /modules
- /allmyenvironment-specific-modules
- /hieradata
- /production
- /manifests
- site.pp
- /modules
- /allmyenvironment-specific-modules
- /hieradata[main]
# The Puppet log directory.
# The default value is '$vardir/log'.
logdir = /var/log/puppet
# Where Puppet PID files are kept.
# The default value is '$vardir/run'.
rundir = /var/run/puppet
# Where SSL certificates are kept.
# The default value is '$confdir/ssl'.
ssldir = $vardir/ssl
environmentpath = $confdir/environments
basemodulepath = $confdir/modules
# default manifest prevents the directory environment from taking
# default_manifest = /etc/puppet/manifests
# Disabling to enable environment-specific site.pp 10/20/2014 tthayer
# disable_per_environment_manifest = true[root@kmadmin102 puppet]# ls -l /etc/puppet/environments/production/
total 12
-rw-r--r-- 1 root root 57 Oct 28 13:39 environment.conf
drwxr-xr-x 3 root root 4096 Oct 24 15:20 manifests
drwxr-xr-x 32 root root 4096 Oct 22 14:51 modules
[root@kmadmin102 puppet]# cat /etc/puppet/environments/production/environment.conf
modulepath = /etc/puppet/environments/production/modules
[root@kmadmin102 puppet]# ls -m -w 80 /etc/puppet/environments/production/modulesapache, apt, awstats, concat, elasticsearch, firewall, gcc, git, inifile, java,km, logrotate, memcached, module_data, mysql, nodejs, perl, php, postgresql,puppet-puppetdbquery, rclocal, redis, repoforge, rsync, src, stdlib, sudo,sysctl, wget, xinetd
[root@kmadmin102 puppet]# puppet module list --environment=production
/usr/share/puppet/modules (no modules installed)Specifying your default_manifest will override your directory environments as per the documentation.
Thedefault_manifestsetting allows you to omit themanifestsdirectory in the environments you create [...].
Any environment that doesn’t set themanifestsetting in itsenvironment.conffile will use [the manifest specified by default_manifest].
John,Sorry, I should have been more thorough -- this is Puppet 3.7 master, running as root (so it has full access to everything).
Yes, 'puppet module --modulepath=/etc/puppet/environments/production/modules list' also works -- but I was under impression that supplying the environmentpath value in puppet.conf, in the [main] section, was sufficient.
I can set the module.path explicitly in each environment.conf file, but I am hoping to avoid that.
Note BTW that calling 'puppet module --confdir=/etc/puppet list' does NOT work: is results in the same error as in the OP -- Puppet simply finds no modules.
My manifest directory is populated with a working manifest: this is the environment I simply copied from our working Puppet 3.4 master installation using explicitly configured environments. Both environments/production/manifests and environments/production/modules directories are properly populated (and yes, I need to use per-environment manifests, not the global one).
certname=kmadmin102.vistaprint.net
# openssl s_client -connect test-kmpuppet:8140 </dev/null 2>&1 | openssl x509 -noout -issuer -subject -datesissuer= /CN=Puppet CA: kmadmin102subject= /CN=kmadmin102.vistaprint.netnotBefore=Oct 27 20:20:30 2014 GMTnotAfter=Oct 27 20:20:30 2019 GMTWithout the certname specified in your config file, does Puppet successfully serve correct manifests?