module ForemanMaintain::Utils::Facter

Constants

FACTER_FILES

Public Class Methods

os_major_release() click to toggle source
# File lib/foreman_maintain/utils/facter.rb, line 17
def self.os_major_release
  execute!("#{path} operatingsystemmajrelease")
end
package() click to toggle source
# File lib/foreman_maintain/utils/facter.rb, line 7
def self.package
  puppet_version = version(execute!('puppet --version'))

  puppet_version.major >= 4 ? 'puppet-agent' : 'facter'
end
path() click to toggle source
# File lib/foreman_maintain/utils/facter.rb, line 13
def self.path
  FACTER_FILES.find { |path| File.exist?(path) }
end