On 05/09/14 16:04, R.I.Pienaar wrote:
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.----- 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 productionTry 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.
OK. We are not using master or ENC environment setting yet. Would this custom fact work any better?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.
Facter.add("environment) do
setcode do
Puppet[:environment]
end
end
--
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/5409D226.70001%40bristol.ac.uk.
For more options, visit https://groups.google.com/d/optout.
