----- Original Message ----- > From: "Jonathan Gazeley" <[email protected]> > To: "puppet-users" <[email protected]> > Sent: Friday, September 5, 2014 4:09:26 PM > Subject: Re: [Puppet Users] --configprint
> On 05/09/14 16:04, R.I.Pienaar wrote: >> >> ----- Original Message ----- >>> From: "Jonathan Gazeley" <[email protected]> >>> To: "puppet-users" <[email protected]> >>> Sent: Friday, September 5, 2014 3:59:28 PM >>> Subject: Re: [Puppet Users] --configprint >>> On 05/09/14 15:02, R.I.Pienaar wrote: >>>> ----- Original Message ----- >>>>> From: "Jonathan Gazeley" <[email protected]> >>>>> To: "puppet-users" <[email protected]> >>>>> Sent: Friday, September 5, 2014 2:53:27 PM >>>>> Subject: [Puppet Users] --configprint >>>>> Hi peeps, >>>>> >>>>> I've just noticed that "puppet agent --configprint runinterval" is not >>>>> doing what I expect. Why does it misreport the environment? The node is >>>>> indeed checking into the netops environment. >>>>> >>>>> [jg4461@web-team-dev ~]$ puppet agent --configprint environment >>>>> production >>>> Try it as root. >>>> >>> OK, that gives the expected output. My question is based on this custom >>> fact: >>> >>> https://gist.github.com/hunner/1989071 >>> >>> MCollective caches the fact as non-root and so I am unable to match on >>> environment when using mco. >> Use the preferred method where in a manifest you dump out the facts to a yaml >> file for mcollective to use. > I'm using puppetlabs-mcollective to configure our MCollective bits. > Basically a completely stock installation, and facts.yaml is written out > each puppet run. However it includes the environment you expect when not > running as root. The way it's doing it, I'd say you just cant rely on it then. >> >> the method you posted there won't work reliably anymore as the node isnt the >> only thing in charge of its environment - the master and ENC can now override >> it. > OK. We are not using master or ENC environment setting yet. Would this > custom fact work any better? > > Facter.add("environment) do > setcode do > Puppet[:environment] > end > end nope, but for this you could probably set environment=foo in [main] in puppet.conf and might work better then -- 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/1789339621.563.1409930442668.JavaMail.zimbra%40devco.net. For more options, visit https://groups.google.com/d/optout.
