Are you using Puppet Enterprise? If so, have a look at this:

https://docs.puppetlabs.com/pe/latest/console_classes_groups_preconfigured_groups.html#the-agent-specified-environment-node-group

If you are using the console for node classification you need to have a
group that allows the agent to specify the environment, to use something
other than production. Or you can create a group that points to a specific
environment.


Rich
On Tue, Sep 22, 2015 at 12:55 AM Andreas Dvorak <[email protected]>
wrote:

> Hi,
>
> I have created a new environment for windows server, but the agent does
> not use it. Can somebody please help me?
>
> message on agent run:
> puppet local environment windows doesn't match server specified node
> environment switching agent to production
>
> puppet.conf of windows agent
>
>     [main]
>     server=puppet-simu.baag
>     ca_server=puppet1-simu.baag
>     autoflush=true
>
>     [agent]
>     environment=windows
>     pluginsync=true
>
> puppet.conf of master
> [main]
>     autosign        = $confdir/autosign.conf { mode = 664 }
>     environmentpath = $confdir/environments
>     logdir          = /var/log/puppet
>     rundir          = /var/run/puppet
>     ssldir          = $vardir/ssl
>     privatekeydir   = $ssldir/private_keys { group = service }
>     hostprivkey     = $privatekeydir/$certname.pem { mode = 640 }
>     pluginsync      = true
>
> [agent]
>     classfile         = $vardir/classes.txt
>     localconfig       = $vardir/localconfig
>     default_schedules = false
>     report            = true
>     pluginsync        = true
>     masterport        = 8140
>     environment       = production
>     certname          = sv2655.muc.baag
>     dns_alt_names     = puppet-simu.baag, puppet1-simu.baag
>     server            = sv2655.muc.baag
>     listen            = false
>     splay             = false
>     runinterval       = 1800
>     noop              = false
>     show_diff         = false
>
> [master]
>     autosign       = $confdir/autosign.conf { mode = 664 }
>     reports        = foreman
>     external_nodes = /etc/puppet/node.rb
>     node_terminus  = exec
>     ca             = true
>     ssldir         = /var/lib/puppet/ssl
>
> cat environment.conf
> config_version = /usr/bin/git --git-dir /data/git/windows/.git show --stat
> | head -1| cut -d" " -f2
> manifest       = /data/git/windows/manifests
> modulepath     = /data/git/windows/modules
>
> # pwd
> /etc/puppet/environments
> # ls -l
> total 20
> drwxr-xr-x 2 root root 4096 Oct 18  2013 common
> drwxr-xr-x 3 root root 4096 Oct 18  2013 development
> drwxr-xr-x 4 root root 4096 Sep 21 09:48 example_env
> drwxr-xr-x 3 root root 4096 Sep 21 10:09 production
> drwxr-xr-x 2 root root 4096 Sep 22 08:48 windows
>
> # pwd
> /data/git/windows/manifests
>
> # ls -l
> total 4
> -rw-rw-r-- 1 gitwin gitwin  23 Sep 22 08:41 nodes.pp
> -rw-rw-r-- 1 gitwin gitwin 195 Sep 22 08:41 site.pp
> # cat site.pp
> node default {
>   notify { 'Server ist noch nicht in Puppet definiert': }
> }
> if versioncmp($::puppetversion, '3.6.0') >= 0 {
>   Package {
>     allow_virtual => true,
>   }
> }
> hiera_include('classes')
>
> # cat nodes.pp
> node 'vm7523.baag' {
> }
>
> Best regards,
> Andreas
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/3b134331-5c38-47b4-bef5-9dd467318b4a%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/3b134331-5c38-47b4-bef5-9dd467318b4a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAPGcbtAOrR3%3DFc%3DoU%2BrxPVewvpB6nE%3DqKmkTwYj1VUmPq1_S-w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to