It probably would be good idea to have a facter of the environment, guess
that could be a very quick way to know what environment the client/agent is
using.

On Fri, Jan 7, 2011 at 9:02 AM, Nigel Kersten <[email protected]> wrote:

> On Fri, Jan 7, 2011 at 6:07 AM, Mohamed Lrhazi <[email protected]> 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 <[email protected]>
> 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 [email protected].
> > To unsubscribe from this group, send email to
> [email protected]<puppet-users%[email protected]>
> .
> > 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 [email protected].
> To unsubscribe from this group, send email to
> [email protected]<puppet-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>


-- 
Tony
http://blog.tonyskapunk.net

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

Reply via email to