Reputation: 109
so I have been puppet for some time and thought it would be good to start using environments. When I run puppet on my node, the catalog run appears to complete but it's not reading my manifest (I put a notify in an it's not appearing)
So on my agent, I have this in the puppet config:
[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
[agent]
server = puppet.server.com
environment = live
When I run a puppet run I get this:
root@server:/var/lib/puppet/ssl# puppet agent --test --environment live
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Fact file /var/lib/puppet/facts.d/README was parsed but returned an empty data set
Info: Caching catalog for server.com
Info: Applying configuration version '1478692343'
Notice: Finished catalog run in 0.08 seconds
So it all looks good and I also see this on my master:
Compiled catalog for server.com in environment live in 0.01 seconds
However on my manifest file, I have set this to ensure it's being read:
notify {'hey there i hit this env':}
Here is the environment setup:
root@puppet:/etc/puppet/environments/live# ls
manifests modules
I have even tried using an environment.conf and setting the manifest manually, neither this or having a manifests folder in the environment appear to work. The manifest is currently named site.pp, but has been called live.pp also.
Now, here is my puppet conf on the master:
[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
certname = puppet.support.com
dns_alt_names = puppet.support.com
server = puppet.support.com
environmentpath = $configdir/environments
[master]
# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY
Does anyone have any idea why the environment manifest is not being read? For clarity, it's below:
cat site.pp
notify {'hey there i hit this env':}
node 'server.com' {
notify {'hey there i hit this node':}
}
Upvotes: 0
Views: 1354
Reputation: 109
"I suspect that you are running into trouble with the environment cache. After changing or adding manifests, it's a good idea to restart the master to invalidate the environment cache. – John Bollinger Nov 9 '16 at"
Upvotes: 0