Sha256: 74709a24fc923a7e98d1d2735ef12fea43b35c058d7c552e7dd72ac8c4c19dc4

Contents?: true

Size: 792 Bytes

Versions: 38

Compression:

Stored size: 792 Bytes

Contents

# Fact: kernelrelease
#
# Purpose: Return the operating system's release number.
#
# Resolution:
#   On AIX returns the output from the "oslevel -s" system command.
#   On Windows based systems, uses the win32ole gem to query Windows Management
#   for the 'Win32_OperatingSystem' value.
#   Otherwise uses the output of "uname -r" system command.
#
# Caveats:
#

Facter.add(:kernelrelease) do
  setcode 'uname -r'
end

Facter.add(:kernelrelease) do
  confine :kernel => :aix
  setcode 'oslevel -s'
end

Facter.add(:kernelrelease) do
  confine :kernel => %{windows}
  setcode do
    require 'facter/util/wmi'
    version = ""
    Facter::Util::WMI.execquery("SELECT Version from Win32_OperatingSystem").each do |ole|
      version = "#{ole.Version}"
      break
    end
    version
  end
end

Version data entries

38 entries across 38 versions & 3 rubygems

Version Path
librarian-puppet-0.9.9 vendor/gems/ruby/1.9.1/gems/facter-1.6.17/lib/facter/kernelrelease.rb
facter-1.6.18 lib/facter/kernelrelease.rb
facter-1.6.18.rc1 lib/facter/kernelrelease.rb
librarian-puppet-0.9.8 vendor/gems/ruby/1.9.1/gems/facter-1.6.17/lib/facter/kernelrelease.rb
facter-1.6.17 lib/facter/kernelrelease.rb
facter-1.6.17.rc1 lib/facter/kernelrelease.rb
facter-1.6.16 lib/facter/kernelrelease.rb
facter-1.6.15 lib/facter/kernelrelease.rb
facter-1.6.15.rc1 lib/facter/kernelrelease.rb
facter-1.6.14 lib/facter/kernelrelease.rb
facter-1.6.14.rc1 lib/facter/kernelrelease.rb
facter-1.6.13 lib/facter/kernelrelease.rb
facter-1.6.13.rc1 lib/facter/kernelrelease.rb
facter-1.6.12 lib/facter/kernelrelease.rb
librarian-puppet-0.9.4 vendor/gems/ruby/1.8/gems/facter-1.6.11/lib/facter/kernelrelease.rb
facter-1.6.12.rc2 lib/facter/kernelrelease.rb
facter-1.6.12.rc1 lib/facter/kernelrelease.rb
supply_drop-0.11.0 examples/vendored-puppet/vendor/facter-1.6.4/lib/facter/kernelrelease.rb
librarian-puppet-0.9.3 vendor/gems/ruby/1.8/gems/facter-1.6.11/lib/facter/kernelrelease.rb
facter-1.6.11 lib/facter/kernelrelease.rb