----- Original Message -----
> From: "Jonathan Gazeley" <[email protected]>
> To: "puppet-users" <[email protected]>
> Sent: Friday, September 5, 2014 4:39:49 PM
> Subject: Re: [Puppet Users] --configprint

> On 05/09/14 16:20, R.I.Pienaar wrote:
>>
>> ----- 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
>>
>  Hmm, OK. Maybe I should step back and ask a more general question.
> What's the best way to use MCollective to match environments, e.g. so I
> can trigger a Puppet run on all my dev boxes?
> 
> Heading home for the weekend now, but I'll pick this up on Monday.

I do it this way 
https://docs.puppetlabs.com/mcollective/deploy/standard.html#populate-the-fact-file

-- 
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/1632234842.586.1409932048429.JavaMail.zimbra%40devco.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to