2015-04-17 14:48:46 +02:00
|
|
|
# Fact: is_pve_kernel
|
2015-04-17 14:24:46 +02:00
|
|
|
#
|
|
|
|
# Purpose: Returns true if the system runs a PVE kernel.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
require 'facter'
|
|
|
|
|
2015-04-17 14:48:46 +02:00
|
|
|
Facter.add(:is_pve_kernel) do
|
2015-04-17 14:24:46 +02:00
|
|
|
setcode do
|
|
|
|
|
|
|
|
pve = if Facter.value(:kernelrelease) =~ /^*pve/
|
|
|
|
'true'
|
|
|
|
else
|
|
|
|
'false'
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|