lib/puppet/node.rb
def fact_merge(facts = nil)
    begin
      @facts = facts.nil? ? Puppet::Node::Facts.indirection.find(name, :environment => environment) : facts
    rescue => detail
      error = Puppet::Error.new(_("Could not retrieve facts for %{name}: %{detail}") % { name: name, detail: detail }, detail)
      error.set_backtrace(detail.backtrace)
      raise error
    end

    if !@facts.nil?
      @facts.sanitize
      merge(@facts.values)
    end
  end
# Merge the node facts with parameters from the node source.
# @api public
# @param facts [optional, Puppet::Node::Facts] facts to merge into node parameters.
#   Will query Facts indirection if not supplied.
# @raise [Puppet::Error] Raise on failure to retrieve facts if not supplied
# @return [nil]
Merge the node facts with parameters from the node source.
Merge the node facts with parameters from the node source .
def fact_merge(facts = nil)
    begin
      @facts = facts.nil? ? Puppet::Node::Facts.indirection.find(name, :environment => environment) : facts
    rescue => detail
      error = Puppet::Error.new(_("Could not retrieve facts for %{name}: %{detail}") % { name: name, detail: detail }, detail)
      error.set_backtrace(detail.backtrace)
      raise error
    end
    if !@facts.nil?
      @facts.sanitize
      merge(@facts.values)
    end
  end
def fact_merge ( facts = nil ) begin @facts = facts . nil? ? Puppet :: Node :: Facts . indirection . find ( name , :environment => environment ) : facts rescue => detail error = Puppet :: Error . new ( _ ( "Could not retrieve facts for %{name}: %{detail}" ) % { name : name , detail : detail } , detail ) error . set_backtrace ( detail . backtrace ) raise error end if ! @facts . nil? @facts . sanitize merge ( @facts . values ) end end
Merge the node facts with parameters from the node source.
Merge the node facts with parameters from the node source .
None
nil
[Puppet::Error] Raise on failure to retrieve facts if not supplied
[ Puppet :: Error ] Raise on failure to retrieve facts if not supplied
facts
facts to merge into node parameters. Will query Facts indirection if not supplied.
facts to merge into node parameters . Will query Facts indirection if not supplied .
api
None