Sha256: b29eac45b5d436cf9539e31de7b20f544c7d6dd64ffa1bd0fa7022781f3b1d2e
Contents?: true
Size: 510 Bytes
Versions: 8
Compression:
Stored size: 510 Bytes
Contents
# frozen_string_literal: true module Facts module Freebsd class IsVirtual FACT_NAME = 'is_virtual' def initialize @virtual = Facter::Util::Facts::VirtualDetector.new end def call_the_resolver fact_value = @virtual.platform Facter::ResolvedFact.new(FACT_NAME, check_if_virtual(fact_value)) end private def check_if_virtual(found_vm) Facter::Util::Facts::PHYSICAL_HYPERVISORS.count(found_vm).zero? end end end end
Version data entries
8 entries across 8 versions & 1 rubygems