Sha256: 25f6f480e1da4f48ed2d6f97dadf05d575f798230653b503e84c97e4a915cc14
Contents?: true
Size: 728 Bytes
Versions: 15
Compression:
Stored size: 728 Bytes
Contents
# frozen_string_literal: true module Facts module Linux module Cloud class Provider FACT_NAME = 'cloud.provider' def call_the_resolver provider = case Facter::Util::Facts::Posix::VirtualDetector.platform when 'hyperv' 'azure' unless Facter::Resolvers::Az.resolve(:metadata).empty? when 'kvm', 'xen' 'aws' unless Facter::Resolvers::Ec2.resolve(:metadata).empty? when 'gce' 'gce' unless Facter::Resolvers::Gce.resolve(:metadata).empty? end Facter::ResolvedFact.new(FACT_NAME, provider) end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems