On Friday, 6 March 2015 16:04:26 UTC, Carl P wrote:
>
> I'm using dynamic environments with PE 3.7. I have production and 
> development sub-directories in /etc/puppetlabs/puppet/environments 
> containing environment.conf, hiera.yaml, Puppetfile, manifests/site.pp and 
> modules/<various modules>
>
> The nodes I'm trying to apply config to are members of the default 
> production node group only. 
>
> When I run 'puppet agent -tv' all gets configured correctly, but when I 
> try to configure it with the code in the development directory using 
> 'puppet agent -tv --environment=development' I see the message:
>
>          Warning: Local environment: "development" doesn't match server 
> specified node environment "production", switching agent to "production".
>

If an ENC (in this case Puppet Console) specifies an environment, then that 
will always override anything the agent tries to do. In general an ENC can 
choose not to set an environment, letting the agent decide. So you either 
need to set the node's environment from the Console, or tell it not to 
specify an environment. According to the PE docs linked below, it's 
possible to put a node in a node group with a special envrionment value of 
"Agent-specified", which will let the node make the decision.

https://docs.puppetlabs.com/pe/latest/console_classes_groups.html#creating-new-node-groups
 

-- 
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/8d40e26e-f2e3-48e3-aef1-3f63d70cb006%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to