Class: Facts::Ubuntu::Os::Release

Inherits:
Object
  • Object
show all
Defined in:
lib/facter/facts/ubuntu/os/release.rb

Constant Summary collapse

FACT_NAME =
'os.release'
ALIASES =
%w[operatingsystemmajrelease operatingsystemrelease].freeze

Instance Method Summary collapse

Instance Method Details

#call_the_resolverObject



10
11
12
13
14
15
16
# File 'lib/facter/facts/ubuntu/os/release.rb', line 10

def call_the_resolver
  version = Facter::Resolvers::OsRelease.resolve(:version_id)

  [Facter::ResolvedFact.new(FACT_NAME, full: version, major: version),
   Facter::ResolvedFact.new(ALIASES.first, version, :legacy),
   Facter::ResolvedFact.new(ALIASES.last, version, :legacy)]
end