On Fri, Jan 7, 2011 at 6:07 AM, Mohamed Lrhazi <lrh...@gmail.com> wrote:
> Thanks  a lot Nigel... I do need to learn to create custom facts indeed.

I should add that even without this custom fact, "$environment" is
available to use as a variable in your Puppet manifests.

It's just not a fact, it's exposed as a global variable.

>
>
> On Thu, Jan 6, 2011 at 11:22 PM, Nigel Kersten <ni...@puppetlabs.com> wrote:
>> facter --puppet shows the facter facts, plus any that have been
>> delivered by puppet and pluginsync.
>>
>> "environment" isn't a fact by default. You could make a fact that
>> reported on the Puppet environment setting however.
>>
>> require 'puppet'
>>
>> Facter.add("environment) do
>>  setcode do
>>    Puppet[:environment]
>>  end
>> end
>>
>> [1] - UNTESTED in anything other than a quick interactive session.
>>
>>>
>
> --
> 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.
>
>

-- 
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.

Reply via email to