Issue #12172 has been updated by Matt Robinson. Description updated
Fortunately, I was wrong in my original description about pluginsync syncing the later items from the modulepath first, so I removed that bit from the description. I had typoed the first directory in my modulepath, which made it seem like it was loading from the last directory in my modulepath. I just put in a ticket to suggest Puppet warn you if you have a directory in your modulepath that does not exist. #12177 ---------------------------------------- Bug #12172: Facts in modules later in the module path should not take precedence over the same facts earlier in the modulepath https://projects.puppetlabs.com/issues/12172 Author: Matt Robinson Status: Accepted Priority: Normal Assignee: Category: facter Target version: Telly Affected Puppet version: Keywords: Branch: If your modulepath="/modules/dir1:/modules/dir2", then having the same fact in both dir1 and dir2 you would expect that the fact definition in dir1 would be the one used. However, the fact in dir2 is currently used since the load_fact_plugins method in lib/puppet/indirector/facts/facter.rb walks the modulepath in order and calls `load` on each file. In general you shouldn't have the same fact declared in multiple directories of your modulepath, which is why I imagine nobody has reported this as a bug. However, the behavior of other things that can go in a module (custom types and providers, manifests) have the behavior that the first occurrence in the modulepath wins. It would be nice to have facts behavior be consistent with this. I know there's a plan to not have load_facts even look at the modulepath, so this may be a non-issue for facts, but pluginsync order is probably still an issue. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" 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-bugs?hl=en.
