Sha256: 99363b92e626b6a2d48a4974695edd18f8be9678a688757e477cd8bec28f1506

Contents?: true

Size: 575 Bytes

Versions: 15

Compression:

Stored size: 575 Bytes

Contents

# frozen_string_literal: true

module Facter
  module Resolvers
    class OsLevel < BaseResolver
      @semaphore = Mutex.new
      @fact_list ||= {}

      class << self
        private

        def post_resolve(fact_name)
          @fact_list.fetch(fact_name) { read_oslevel(fact_name) }
        end

        def read_oslevel(fact_name)
          output = Facter::Core::Execution.execute('/usr/bin/oslevel -s', logger: log)
          @fact_list[:build] = output
          @fact_list[:kernel] = 'AIX'

          @fact_list[fact_name]
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
facter-4.0.36 lib/facter/resolvers/aix/os_level_resolver.rb
facter-4.0.35 lib/facter/resolvers/aix/os_level_resolver.rb
facter-4.0.34 lib/facter/resolvers/aix/os_level_resolver.rb
facter-4.0.33 lib/facter/resolvers/aix/os_level_resolver.rb
facter-4.0.32 lib/facter/resolvers/aix/os_level_resolver.rb
facter-4.0.31 lib/facter/resolvers/aix/os_level_resolver.rb
facter-4.0.30 lib/facter/resolvers/aix/os_level_resolver.rb
facter-4.0.29 lib/resolvers/aix/os_level_resolver.rb
facter-4.0.28 lib/resolvers/aix/os_level_resolver.rb
facter-4.0.26 lib/resolvers/aix/os_level_resolver.rb
facter-4.0.25 lib/resolvers/aix/os_level_resolver.rb
facter-4.0.24 lib/resolvers/aix/os_level_resolver.rb
facter-4.0.23 lib/resolvers/aix/os_level_resolver.rb
facter-4.0.22 lib/resolvers/aix/os_level_resolver.rb
facter-4.0.21 lib/resolvers/aix/os_level_resolver.rb