From: Aurelien Jarno Date: Sat, 8 Apr 2017 08:59:23 +0000 (+0200) Subject: Fix kvmdomain facter X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=801dbab607d7ea046f89db2d3fe553ebfda0d228;p=mirror%2Fdsa-puppet.git Fix kvmdomain facter QEMU can return a CPU model different than "QEMU Virtual CPU". Check for the "hypervisor" flag instead. Signed-off-by: Aurelien Jarno --- diff --git a/modules/debian_org/lib/facter/servertype.rb b/modules/debian_org/lib/facter/servertype.rb index 21dba00b6..d3098352d 100644 --- a/modules/debian_org/lib/facter/servertype.rb +++ b/modules/debian_org/lib/facter/servertype.rb @@ -1,7 +1,7 @@ Facter.add("kvmdomain") do setcode do result = false - if File.new('/proc/cpuinfo').read().index('QEMU Virtual CPU') + if File.new('/proc/cpuinfo').read().index('hypervisor') result = true end result