As far as I know thats true... One option to limit facts is to use
confine to limit where its gets run.

For example, here is a fact that is clearly only applicable for
Solaris hosts:

    Facter.add("obpversion") do
        confine :kernel => :sunos
        setcode do
                %x{/usr/sbin/prtconf -V}.chomp.split(" ")[1]
        end
    end

Whilst this won't stop it from being downloaded, it will mean that the
code will only be run on hosts that meet the requirements.

Hope that helps...



On Feb 17, 11:23 am, Nan Liu <[email protected]> wrote:
> On Thu, Feb 16, 2012 at 3:19 PM, Tony C <[email protected]> wrote:
> > I'm not sure if this is the right group or not, but i'll start here.
>
> > I have Puppet enterprise 2.0, playing around with custom facts.
>
> > I have noticed that adding a custom fact to any module will distribute
> > that fact to all machines, regardless if they are assigned to that
> > module or not. Is there a way around this, or is this just by design?
>
> Gary already pointed out the cron job. I'm not aware of an easy way to
> perform limited pluginsync, it's either all or nothing. The reason
> this is not possible, puppet need facts to compile catalog to know
> what modules belong to a node, and puppet can't compile without facts,
> so chicken and egg. For example, puppet can't know if it should
> pluginsync my_fact if it's in my_module with the following code:
>
> if $my_fact {include my_module}
>
> HTH,
>
> Nan

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