def execute_plugins!
      return self unless @config["facts"].is_a?(Hash)

      @config["facts"].each do |fact_tag, args|
        fact_names(fact_tag, args).each do |fact_name|
          @facts[fact_name] ||= OctofactsUpdater::Fact.new(fact_name, nil)
          plugin_name = args.fetch("plugin", "noop")
          OctofactsUpdater::Plugin.execute(plugin_name, @facts[fact_name], args, @facts)
          @facts.delete(fact_name) if @facts[fact_name].value.nil?
        end
      end

      self
    end
def execute_plugins!
      return self unless @config["facts"].is_a?(Hash)

      @config["facts"].each do |fact_tag, args|
        fact_names(fact_tag, args).each do |fact_name|
          @facts[fact_name] ||= OctofactsUpdater::Fact.new(fact_name, nil)
          plugin_name = args.fetch("plugin", "noop")
          OctofactsUpdater::Plugin.execute(plugin_name, @facts[fact_name], args, @facts)
          @facts.delete(fact_name) if @facts[fact_name].value.nil?
        end
      end

      self
    end
Constructor.

 hostname  - A String with the FQDN of the host.
 config    - A Hash with configuration data.
 fact_hash - A Hash with the facts (key = fact name, value = fact value).
 Execute plugins to clean up facts as per configuration. This modifies the value of the facts
 stored in this object. Any facts with a value of nil are removed.

 Returns a copy of this object.