|
Melissa Stone,
I think the drop dead simple most people encounter this issue is that they, like all good sysadmins, want to remove the warning they see on non-production managed puppet nodes (not the server):
Notice: Local environment: 'production' doesn't match server specified node environment 'development', switching agent to 'development'.
Some people see that and get concerned and do something like this: https://groups.google.com/forum/#!topic/puppet-users/RjdQ7jXLx5w
The unfortunate issue is that that advice USED to work, but now causes fireworks. I suppose it could still work if we added an additional resource to the base profile: {{class profile::base { ... ini_setting { "puppet_environment": ensure => present, path => '/etc/puppet/puppet.conf', section => 'agent', setting => 'environment', value => $::environment, }
file { 'create empty local environment on agent nodes so puppet commands don't explode' : ensure => present, path => "/etc/puppetlabs/code/environments/$ {environment}
, } ... }}} (This is related to your second scenario).
|