On Friday, February 25, 2011 2:10:13 PM UTC+1, Thomas Bellman wrote:
>
> On 2011-02-25 13:27, Dave Augustus wrote:
>
> > I have added the following in my puppetmaster.conf file:
> > 
> > [production]
> >     manifest = $vardir/env/production/manifests/site.pp
> >     modulepath = 
> $vardir/env/production/modules:$vardir/env/common/modules
> > [test]
> >     manifest = $vardir/env/test/manifests/site.pp
> >     modulepath = $vardir/env/test/modules:$vardir/env/common/modules
> > [development]
> >     manifest = $vardir/env/development/manifests/site.pp
> >     modulepath = 
> $vardir/env/development/modules:$vardir/env/common/modules
> > 
> > On each client, in puppet.conf:
> > 
> > [main]
> >         environment = test
> > 
> > The end result is 3 sets of manifests and modules. I then can move a
> > module between the environments as needed.
>
> But you can't have different versions of the external node classifier
> script in your environments.  You can't try out a new version of that
> in development, while still having the tried and trusted version
> running in production.
>
> Unless you go for a wrapper script that just digs out the environment
> from /var/lib/puppet/yaml/facts/NODENAME.yaml and execs the script
> that belongs to that environment.  And except for the part of digging
> through a YAML file, it is a pretty easy thing to do, but it is a tiny
> bit ugly.
>

I am digging out this old topic. Has anything changed? I have tried the 
above method but unfortunately, /var/lib/puppet/yaml/facts/NODENAME.yaml is 
only updated after classification. On first run, there is no such file. 
There is nothing udpated in /var/lib/puppet on first run that would get us 
the right environment. The classifier is run without any environment 
variable.

Since 2011, is there anything new for this?

>

-- 
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/b3b42ab8-f17a-461e-b29d-070780c24454%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to