Class: Facts::Windows::Os::Release
- Inherits:
-
Object
- Object
- Facts::Windows::Os::Release
- Defined in:
- lib/facter/facts/windows/os/release.rb
Constant Summary collapse
- FACT_NAME =
'os.release'
- ALIASES =
%w[operatingsystemmajrelease operatingsystemrelease].freeze
Instance Method Summary collapse
Instance Method Details
#call_the_resolver ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/facter/facts/windows/os/release.rb', line 10 def call_the_resolver arr = [] input = { consumerrel: description_resolver(:consumerrel), description: description_resolver(:description), version: kernel_resolver(:kernelmajorversion), kernel_version: kernel_resolver(:kernelversion) } fact_value = Facter::Util::Facts::WindowsReleaseFinder.find_release(input) arr << Facter::ResolvedFact.new(FACT_NAME, ({ full: fact_value, major: fact_value } if fact_value)) ALIASES.each { |aliass| arr << Facter::ResolvedFact.new(aliass, fact_value, :legacy) } arr end |
#description_resolver(key) ⇒ Object
25 26 27 |
# File 'lib/facter/facts/windows/os/release.rb', line 25 def description_resolver(key) Facter::Resolvers::WinOsDescription.resolve(key) end |