diff --git a/lib/facter/util/facts/posix/virtual_detector.rb b/lib/facter/util/facts/posix/virtual_detector.rb index 24bf14e4f2..fae5cec65c 100644 --- a/lib/facter/util/facts/posix/virtual_detector.rb +++ b/lib/facter/util/facts/posix/virtual_detector.rb @@ -7,9 +7,9 @@ module Posix module VirtualDetector class << self def platform - @@fact_value ||= check_docker_lxc || check_freebsd || check_gce || retrieve_from_virt_what + @@fact_value ||= check_docker_lxc || check_freebsd || check_openbsd || check_gce || retrieve_from_virt_what @@fact_value ||= check_vmware || check_open_vz || check_vserver || check_xen || check_other_facts - @@fact_value ||= check_openbsd || check_lspci || 'physical' + @@fact_value ||= check_lspci || 'physical' @@fact_value end diff --git a/spec/facter/util/facts/posix/virtual_detector_spec.rb b/spec/facter/util/facts/posix/virtual_detector_spec.rb index efe67dc52b..dc7dbf416f 100644 --- a/spec/facter/util/facts/posix/virtual_detector_spec.rb +++ b/spec/facter/util/facts/posix/virtual_detector_spec.rb @@ -52,6 +52,7 @@ before do allow(Facter::Resolvers::Containers).to receive(:resolve).with(:vm).and_return(nil) + allow(Facter::Resolvers::Freebsd::Virtual).to receive(:resolve).with(:vm).and_return(nil) allow(Facter::Resolvers::Openbsd::Virtual).to receive(:resolve).with(:vm).and_return('vmm') end @@ -72,6 +73,7 @@ before do allow(Facter::Resolvers::Containers).to receive(:resolve).with(:vm).and_return(nil) allow(Facter::Resolvers::Freebsd::Virtual).to receive(:resolve).with(:vm).and_return(nil) + allow(Facter::Resolvers::Openbsd::Virtual).to receive(:resolve).with(:vm).and_return(nil) allow(Facter::Resolvers::Linux::DmiBios).to receive(:resolve).with(:bios_vendor).and_return('Google Engine') end