Hi guys,

I am trying to understand fact precedence and pluginsync.
Documentation says, by default, the weight of a fact is the number of
confines for that fact, so that more specific facts are evaluated first.

1. I made a module "core" which adds a facter "test" and has filename
test.rb. (in location modules/core/lib/facter/test/test.rb). Note that
facter is in "test" folder.
2. This above module "core" is included in all nodes.
3. Another module "newmod" also adds the facter "test" & has the
filename test.rb but this time, location is modules/core/lib/facter/test.rb.

In all the nodes, first "include core" comes and then "include newmod"
comes. When I see the facter value, the newmod's file is run. Why?

Pluginsync syncs both files and one exists in root of
"/var/lib/puppet/lib/facter" while the other exists in
"/var/lib/puppet/lib/facter/test" folder. Running strace reveals that
facter command opens both test.rbs but somehow selects the correct one.

The behaviour that's happening is expected but I am trying to understand
why is this happening. Please note that nowhere in the code of adding
facts, I am using has_weight.

Abhijeet R

You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
grouppuppet-users @
postedNov 6, '12 at 7:31a
activeNov 6, '12 at 9:23a

1 user in discussion

Abhijeet R: 2 posts



site design / logo © 2022 Grokbase