Class: Facts::Windows::Sshalgorithmkey

Inherits:
Object
  • Object
show all
Defined in:
lib/facter/facts/windows/sshalgorithmkey.rb

Constant Summary collapse

FACT_NAME =
'ssh.*key'
TYPE =
:legacy

Instance Method Summary collapse

Instance Method Details

#call_the_resolverObject



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/facter/facts/windows/sshalgorithmkey.rb', line 9

def call_the_resolver
  facts = []
  privileged = Facter::Resolvers::Identity.resolve(:privileged)

  return facts unless privileged

  result = Facter::Resolvers::Windows::Ssh.resolve(:ssh)

  result&.each { |ssh| facts << Facter::ResolvedFact.new("ssh#{ssh.name.to_sym}key", ssh.key, :legacy) }
  facts
end