2nd environment not getting recognized on puppet agent for deployment

asked 2017-10-02 07:27:02 -0500

Hi all,

I'm rather new, but I'm trying to set up a new, separate environment called "test" on puppet master. We have a monolithic installation in place, all on one RH7 host. We have 2 CentOS machines with puppet agent installed.

Used setup:

  • PE, version v2017.2.3
  • Puppet agent: 4.10.5

We created 1 Env. group and 1 node group:

  • Environment group called "Test environment"
  • Node group called "CentOS nodes"
  • All are in the environment "test"

Configured modulepath: /etc/puppetlabs/code/environments/production/modules:/etc/puppetlabs/code/modules:/opt/puppetlabs/puppet/modules

Environment path: /etc/puppetlabs/code/environments

The "environments" folder contains a subfolder with test, which contains envrionment.conf, hierdata, manifests and modules folder. The enviornment.conf folder is blank, nothing configured --> means everything should be on default, guiding to the "test" environment. The "manifest" folder contains a site.pp file, in which I specified a custom class that should create a user.

We assigned both CentOS test nodes to the "test" environment, but still the "production" environment settings are getting applied to the test nodes. If I specify the environment on the puppet agent node in the puppet.conf file, the "test" environment is getting applied to the nodes.

If I understood it correctly, shouldn't there be a way without specifying the target environment on the puppet agent nodes?

Running "puppet config print all | grep environment" returns the following:

strict_environment_mode = false
environment = production
environmentpath = /etc/puppetlabs/code/environments
environment_timeout = 0
environment_data_provider =
manifest = /etc/puppetlabs/code/environments/production/manifests
modulepath = /etc/puppetlabs/code/environments/production/modules:/etc/puppetlabs/code/modules:/opt/puppetlabs/puppet/modules
disable_per_environment_manifest = false

Thanks for shining some light in my darkness !

edit retag flag offensive close merge delete