On Tue, Dec 14, 2010 at 12:09 PM, Nigel Kersten <ni...@puppetlabs.com>wrote:
> > > On Tue, Dec 14, 2010 at 9:05 AM, Rameses Mss <rmss60...@gmail.com> wrote: > >> On Tue, Dec 14, 2010 at 12:01 PM, Ohad Levy <ohadl...@gmail.com> wrote: >> >>> >>> On Tue, Dec 14, 2010 at 6:39 PM, Rameses Mss <rmss60...@gmail.com>wrote: >>> >>>> On Tue, Dec 14, 2010 at 11:22 AM, Nigel Kersten >>>> <ni...@puppetlabs.com>wrote: >>>> >>>>> >>>>> >>>>> On Tue, Dec 14, 2010 at 7:39 AM, Rameses Mss <rmss60...@gmail.com>wrote: >>>>> >>>>>> My custom external nodes script sets the environment variable, but >>>>>> Puppet ignores it. >>>>>> >>>>>> For testing, I have a manifest that deploys this template to a file: >>>>>> environment = <%= environment %> >>>>>> >>>>>> The output from my external nodes script: >>>>>> --- >>>>>> classes: >>>>>> - devhost >>>>>> environment: development >>>>>> parameters: >>>>>> memcached_memory: '32' >>>>>> >>>>>> But running "puppetd --test" results in the file's contents: >>>>>> environment = production >>>>>> >>>>>> Why is my external nodes environment being ignored? >>>>>> >>>>> >>>>> http://projects.puppetlabs.com/issues/3910 >>>>> >>>> >>>> My client is not specifying an environment. >>>> >>> The problem here is that the puppet client request the catalog from a the >>> master and encode the environment in the url, if none is defined, it fall >>> backs to default = "production".... >>> >>> Ohad >>> >> >> Ah. So if using external nodes, I don't get to use the environment >> variable in my templates. Ick. >> > > No, you just need to set the environment client-side and not in the > classifier. > > There are ways around this bug, it's just really annoying. How do you make > the environment determination now? > > -- > Nigel Kersten - Puppet Labs - http://www.puppetlabs.com > It's stored in a database on the puppetmaster that's used as the source for a bunch of other scripts. The client doesn't have access to the information, sadly. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.