* New fact is_pve_kernel check if the running kernel is a PVE.
This commit is contained in:
parent
0d71a5cee2
commit
8cd1a0e39a
12
CHANGELOG.md
12
CHANGELOG.md
|
@ -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
|
### 0.2.2 - 2015/03/25
|
||||||
|
|
|
@ -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
|
Loading…
Reference in New Issue