I tried to work around the problem by having a copy of the ENC per environment, which would work for me too... but then that does not work either:
external_nodes = /etc/puppet/environments/$environment/gu-enc/gu-enc.py In the above, $environment evaluates to "production" even though my "puppet agent" call specified a different environment. I guess the above is evaluated on master's start up, only once, not per client invocation. Thanks a lot, Mohamed. On Sun, Oct 16, 2011 at 1:26 PM, Mohamed Lrhazi <[email protected]> wrote: > Hello, > > I started writing an ENC and run into what seems like a chicken and > egg problem... > > I was starting off by getting the client's facts from the inventory > service by getting: > > https://puppetmaster:8140/production/facts/$client_hostname > > and then was getting the "environment" from the fact named "environment" > > then I realized that "production" in the previous URL is the > environment I am querying! > > Is there another way of finding the environment that the client is > providing to the master? > > Thanks a lot, > Mohamed. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
