Sha256: 4231bd3fe3e40b1d7a775de0c0a0fff8bc6c8ff7faa161252e019ee14b318bfb
Contents?: true
Size: 524 Bytes
Versions: 31
Compression:
Stored size: 524 Bytes
Contents
# frozen_string_literal: true module Facts module Linux class AzMetadata FACT_NAME = 'az_metadata' 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 private def azure_hypervisor? Facter::Util::Facts::Posix::VirtualDetector.platform == 'hyperv' end end end end
Version data entries
31 entries across 31 versions & 1 rubygems