# File lib/mcollective/facts/yaml_facts.rb, line 17 def load_facts_from_source config = Config.instance fact_files = config.pluginconf["yaml"].split(File::PATH_SEPARATOR) facts = {} fact_files.each do |file| begin if File.exist?(file) facts.merge!(YAML.load(File.read(file))) else raise("Can't find YAML file to load: #{file}") end rescue Exception => e Log.error("Failed to load yaml facts from #{file}: #{e.class}: #{e}") end end facts end