On Aug 3, 2011, at 2:46 PM, jcbollinger wrote:
> On Aug 3, 11:50 am, Craig White <craig.wh...@ttiltd.com> wrote:
>> On Aug 3, 2011, at 9:33 AM, jcbollinger wrote:
>> 
>>> Environments don't get as much discussion around here nowadays as they
>>> used to get, and I suppose that's because run stages have stolen some
>>> of their thunder.  Nevertheless, there are scenarios for which
>>> environments are better suited than is any other Puppet feature, and
>>> some of those are in the area of initial provisioning.
>> 
>> ----
>> I've sort of been scratching at that post but unable to find the proper 
>> technique to solve my itch.
>> 
>> Obviously can set something like 'environment = staging' in 
>> /etc/puppet/puppet.conf on the master
>> 
>> and then it will pick it up but when changing it with an External Nodes 
>> Classifier (in my case, foreman), and using an erb template for the clients' 
>> puppet.conf which has environment = <%= environment %> - one would think 
>> that this would change but it doesn't
>> 
>> http://projects.puppetlabs.com/issues/3910
>> 
>> so I believe there is some limbo here
> 
> 
> I think you're saying that the variable 'environment' is not working
> for this purpose.  I'm not very surprised.  Not only is there some
> ambiguity surrounding whether it should or does represent the client's
> requested environment or the server's imposed environment, but more
> importantly, *neither* of those is what you actually want: the
> environment the client should use *next time*.  Your ENC or an
> appropriate class should set that value in a different variable (e.g.
> targetEnvironment, nextEnvironment, ...), and your template should use
> that.
----
sure - that's what Ohad suggested and it's somewhat workable. The issue really 
is that this is a hack workaround. For example, the interface for configuring 
the environment in foreman allows you to select it but it doesn't change a 
thing on the client. So there's a disconnect when you define the environment in 
an ENC - the client simply ignores it.

I would find a 'next time' implementation to be perfect and much better than 
the deafness that it currently has.

Craig

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to