403Webshell
Server IP : 66.29.132.122  /  Your IP : 13.58.116.51
Web Server : LiteSpeed
System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : admazpex ( 531)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/proc/self/root/proc/thread-self/root/proc/thread-self/root/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/proc/self/root/proc/thread-self/root/proc/thread-self/root/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet//facter_impl.rb
# frozen_string_literal: true

#
# @api private
# Default Facter implementation that delegates to Facter API
#

module Puppet
  class FacterImpl
    def initialize
      require 'facter'

      setup_logging
    end

    def value(fact_name)
      ::Facter.value(fact_name)
    end

    def add(name, &block)
      ::Facter.add(name, &block)
    end

    def to_hash
      ::Facter.to_hash
    end

    def clear
      ::Facter.clear
    end

    def reset
      ::Facter.reset
    end

    def resolve(options)
      ::Facter.resolve(options)
    end

    def search_external(dirs)
      ::Facter.search_external(dirs)
    end

    def search(*dirs)
      ::Facter.search(*dirs)
    end

    def trace(value)
      ::Facter.trace(value) if ::Facter.respond_to? :trace
    end

    def debugging(value)
      ::Facter.debugging(value) if ::Facter.respond_to?(:debugging)
    end

    def load_external?
      ::Facter.respond_to?(:load_external)
    end

    def load_external(value)
      ::Facter.load_external(value) if self.load_external?
    end

    private

    def setup_logging
      return unless ::Facter.respond_to? :on_message

      ::Facter.on_message do |level, message|
        case level
        when :trace, :debug
          level = :debug
        when :info
          # Same as Puppet
        when :warn
          level = :warning
        when :error
          level = :err
        when :fatal
          level = :crit
        else
          next
        end

        Puppet::Util::Log.create(
          {
            :level => level,
            :source => 'Facter',
            :message => message
          }
        )
        nil
      end
    end
  end
end

Youez - 2016 - github.com/yon3zu
LinuXploit