If you want the warning to go away, you could set the value in puppet.conf 
to match the ENC setting via something like the below (using 
puppetlabs/inifile module).

You'll still get the warning on the first run, but it should go away on 
subsequent ones (unless the ENC-set environment changes)

ini_setting { "puppet_environment":

  ensure  => present,
  path    => '/etc/puppet/puppet.conf',
  section => 'agent',
  setting => 'environment',
  value   => $::environment,
}

<https://github.com/puppetlabs/puppetlabs-inifile#usage>



On Saturday, January 30, 2016 at 11:38:10 AM UTC-5, Matt Zagrabelny wrote:
>
> Hi Martin, 
>
> On Sat, Jan 30, 2016 at 5:03 AM, Martin Alfke <tux...@gmail.com 
> <javascript:>> wrote: 
> > Hi Matt, 
> > 
> > an ENC can set an environment for a node. 
>
> Yep. I'm using an ENC to set the environment to 'apt'. 
>
> > In case that a node does not specify an environment it will make use of 
> environment production. 
> > You can specify node environment on the node in puppet.conf in agent 
> section: 
> > 
> > [agent] 
> > environment = apt 
>
> Sure. I'd like to avoid setting any environment in the puppet.conf and 
> only use the ENC *and* not get the warning. 
>
> Any ideas? 
>
> Thanks for the help! 
>
> -m 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/5c7fe4d2-e1b6-42c9-b872-6a4ec29509a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to