Hey Jeffrey,

Yes, many sites have a 'stdlib' or 'global' that contains custom facts,
functions, types/providers, and the like.  You wouldn't even need a class
declaration at all, you could just have a directory called 'global' that
has lib/facter/{facts here} in it.  As long as that global module is in the
$modulepath, then all of your nodes have their custom facts.

On Mon, Feb 13, 2012 at 9:36 AM, Jeffrey Watts <[email protected]>wrote:

> Yes, thanks.  My only concern though is that catalogs will fail to compile
> if that particular module that it's located in isn't included in that node
> definition.  I worry that any successors will not be able to easily figure
> out what I've done.
>
> Could I create a module named "global" and have it simply be where things
> like that live?  What's the minimum I'd need to have in it?  An init.pp
> with simply "class global { }"?  Are there other, better ways?
>
> Thanks again,
> Jeffrey.
>
>
> On Mon, Feb 13, 2012 at 11:29 AM, Gary Larizza <[email protected]>wrote:
>>
>>
>> Hi Jeffrey,
>>
>> You're correct about the placement of the file, however you don't need to
>> include it in EVERY module you use.  That fact only needs to be in ONE of
>> your modules for every node to utilize it as a Facter fact (currently, ANY
>> Facter facts that are in your $modulepatch get loaded by ALL of your nodes).
>>
>> So repeating this code is very redundant.  Does this makes sense?
>>
>>  --
> 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.
>



-- 

Gary Larizza
Professional Services Engineer
Puppet Labs

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