Class: Facts::Windows::AzMetadata

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

Constant Summary collapse

FACT_NAME =
'az_metadata'

Instance Method Summary collapse

Instance Method Details

#call_the_resolverObject



8
9
10
11
12
13
14
# File 'lib/facter/facts/windows/az_metadata.rb', line 8

def call_the_resolver
  return Facter::ResolvedFact.new(FACT_NAME, nil) unless azure_hypervisor?

  fact_value = Facter::Resolvers::Az.resolve(:metadata)

  Facter::ResolvedFact.new(FACT_NAME, fact_value&.empty? ? nil : fact_value)
end