HEX
Server: Apache
System: Linux hp3-stn-1011028.hostingp3.local 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: csh958633 (951153)
PHP: 8.3.30
Disabled: shell_exec,exec,system,popen,set_time_limit
Upload Files
File: //usr/share/ruby/vendor_ruby/puppet/indirector/facts/inventory_service.rb
require 'puppet/node/facts'
require 'puppet/indirector/rest'

class Puppet::Node::Facts::InventoryService < Puppet::Indirector::REST
  desc "Find and save facts about nodes using a remote inventory service."
  use_server_setting(:inventory_server)
  use_port_setting(:inventory_port)

  # We don't want failing to upload to the inventory service to cause any
  # failures, so we just suppress them and warn.
  def save(request)
    begin
      super
      true
    rescue => e
      Puppet.warning "Could not upload facts for #{request.key} to inventory service: #{e.to_s}"
      false
    end
  end
end