Ask Your Question
0

set puppet enviroment, but it not work!

asked 2016-05-11 04:50:02 -0500

vuhiep gravatar image

I have my master config :

[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
certname=puppet
dns_alt_names=puppet,puppet.master.com
environmentpath=$confdir/environments
#manifest=$manifestdir
[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

[idevelopment]
manifest = $confdir/environments/$environment/manifests/

and my agent 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.master.com
environment = idevelopment

but when I run command : puppet agent --test , on my node. it still get default enviroment. please tell me what i'm wrong. thank you

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-05-11 10:13:11 -0500

if you run puppet config print --section agent environment on client what does it give you - it should say idevelopment if above is correct.

however - are you using an ENC or a puppet console? setting environment here overrides the setting you have in puppet.conf which is what looks like is happening.(have you printed the entire puppet.conf of your master?)

edit flag offensive delete link more

Comments

when I run command "puppet config print --section agent environment", It say "idevelopment ". but when I apply config, it still emty. I using puppet console and that is entire my puppet master config.

vuhiep gravatar imagevuhiep ( 2016-05-11 20:58:46 -0500 )edit

how is your ideveloment environment created on your master? (is it a subfolder under `sudo puppet config print environmentpath`). do you have the disable_per_environment_manifest set to true?

DarylW gravatar imageDarylW ( 2016-05-11 22:09:35 -0500 )edit

my ideveloment environment in /etc/puppet/environments/idevelopment. command `sudo puppet config print environmentpath` return : /etc/puppet/environments and `disable_per_environment_manifest = false `

vuhiep gravatar imagevuhiep ( 2016-05-11 23:18:04 -0500 )edit

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2016-05-11 04:50:02 -0500

Seen: 80 times

Last updated: May 11 '16