What happens when you run
puppet module list --environment=production
?
Your configuration doesn't define which environment the puppet agent lives
in, so it _should_default to production but I've been running into this
kind of thing myself. This directory structure is working for me:
/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
Specifying your default_manifest will override your directory environments
as per the documentation. My puppet.conf has some lines like this in it to
remind me:
[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
- Tony
On Monday, October 27, 2014 2:43:07 PM UTC-7, Victor Danilchenko wrote:
>
> 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.
>
> Here's my main config file, stripped of comments:
>
> [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]
>
> Can someone see what I am doing wrong?
>
> I also have PuppetDB installed, but that shouldn't affect 'puppet modules
> list' command. Puppet fails the same way with or without PuppetDB.
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/a98aa680-31bc-4a67-94f7-21deadb99797%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.