Ask Your Question
0

Why is the Puppet agent not recognising environments?

asked 2015-02-15 19:33:36 -0600

kaizenCoder gravatar image

I have configured dynamic environments in puppet.conf such as:

 modulepath = $confdir/environments/$environment/modules
 manifest = $confdir/environments/$environment/site/manifests/site.pp
 environmentpath = /etc/puppetlabs/puppet/environments

My environments dir has the environments along with manifest/site.pp file and modules dir.

However when I run the agent sudo puppet agent --test --environment=test I get the following error (I have not set the environment to production in the agent's puppet.conf file):

Warning: Local environment: "test" doesn't match server specified node environment "production", switching agent to "production".

It only applies the production environment's modules.

I am using puppet enterprise 3.7.3.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-02-16 03:06:31 -0600

Nick gravatar image

If you are using an ENC (which Puppet Enterprise generally does) and the ENC specifies an environment, then that will always take precedence and the agent can't choose its own environment. You'll need to choose the node's environment from Puppet Console, unless somebody knows of a way to stop PE from passing an environment to the master.

edit flag offensive delete link more

Comments

yup discovered that the default environment was set to 'production' via the console. Sorted now, thanks.

kaizenCoder gravatar imagekaizenCoder ( 2015-02-17 19:50:24 -0600 )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

1 follower

Stats

Asked: 2015-02-15 19:33:36 -0600

Seen: 833 times

Last updated: Feb 16 '15