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.
--
Cheers,
Abhijeet R
http://blog.abhijeetr.com
--
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+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.