This value makes it highly likely that external facts will take precedence over all other facts
# File lib/facter/util/directory_loader.rb, line 45 def self.default_loader loaders = Facter::Util::Config.external_facts_dirs.collect do |dir| Facter::Util::DirectoryLoader.new(dir) end Facter::Util::CompositeLoader.new(loaders) end
Load facts from files in fact directory using the relevant parser classes to parse them.
# File lib/facter/util/directory_loader.rb, line 54 def load(collection) entries.each do |file| parser = Facter::Util::Parser.parser_for(file) if parser == nil next end data = parser.results if data == false Facter.warn "Could not interpret fact file #{file}" elsif data == {} or data == nil Facter.warn "Fact file #{file} was parsed but returned an empty data set" else data.each { |p,v| collection.add(p, :value => v) { has_weight(EXTERNAL_FACT_WEIGHT) } } end end end
Generated with the Darkfish Rdoc Generator 2.