* New fact is_pve_kernel check if the running kernel is a PVE.

This commit is contained in:
gardouille 2015-04-17 14:24:46 +02:00
parent 0d71a5cee2
commit 8cd1a0e39a
2 changed files with 31 additions and 0 deletions

View File

@ -1,4 +1,16 @@
---------------------------------------
### 0.2. -
##### Features
* New fact is_pve_kernel check if the running kernel is a PVE.
##### Changes
##### Bugfixes
---------------------------------------
### 0.2.2 - 2015/03/25

View File

@ -0,0 +1,19 @@
# Fact: is_proxmox
#
# Purpose: Returns true if the system runs a PVE kernel.
#
#
require 'facter'
Facter.add(:is_proxmox) do
setcode do
pve = if Facter.value(:kernelrelease) =~ /^*pve/
'true'
else
'false'
end
end
end