* Some installation's instructions only run if running a PVE kernel (test the new is_pve_kernel fact).
This commit is contained in:
parent
8cd1a0e39a
commit
3c5e199e8c
|
@ -7,6 +7,7 @@
|
||||||
* New fact is_pve_kernel check if the running kernel is a PVE.
|
* New fact is_pve_kernel check if the running kernel is a PVE.
|
||||||
|
|
||||||
##### Changes
|
##### Changes
|
||||||
|
* Some installation's instructions only run if running a PVE kernel (test the new is_pve_kernel fact).
|
||||||
|
|
||||||
##### Bugfixes
|
##### Bugfixes
|
||||||
|
|
||||||
|
|
|
@ -9,33 +9,8 @@ class proxmox::hypervisor::install {
|
||||||
logoutput => 'on_failure',
|
logoutput => 'on_failure',
|
||||||
}
|
}
|
||||||
|
|
||||||
# If the system run on a standard Debian Kernel
|
# If the system already run a PVE kernel
|
||||||
if $::kernelrelease == '3.2.0-4-amd64' {
|
if $::is_pve_kernel == 'true' {
|
||||||
# To avoid unwanted reboot (kernel update for example), the PVE kernel is
|
|
||||||
# installed only if the system run on a standard Debian.
|
|
||||||
# You will need to update your PVE kernel manually.
|
|
||||||
|
|
||||||
# Installation of the PVE Kernel
|
|
||||||
if $proxmox::hypervisor::kvm_only == true {
|
|
||||||
notify { "Need to install a PVE kernel (${proxmox::hypervisor::kernel_kvm_pkg_name}) and reboot the system to run it ...": }
|
|
||||||
->
|
|
||||||
package { $proxmox::hypervisor::kernel_kvm_pkg_name:
|
|
||||||
ensure => $proxmox::hypervisor::ve_pkg_ensure,
|
|
||||||
notify => Exec['update_grub','reboot_to_pve'],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
notify { "Need to install a PVE kernel (${proxmox::hypervisor::kernel_pkg_name}) and reboot the system to run it ...": }
|
|
||||||
->
|
|
||||||
package { $proxmox::hypervisor::kernel_pkg_name:
|
|
||||||
ensure => $proxmox::hypervisor::ve_pkg_ensure,
|
|
||||||
notify => Exec['update_grub','grub_reboot'],
|
|
||||||
}
|
|
||||||
# The kernel that allow KVM + OpenVZ is older than the standard Debian's
|
|
||||||
# kernel, so grub reboot must be used
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else { # If the system already run a PVE kernel
|
|
||||||
|
|
||||||
# Installation of Virtual Environnment
|
# Installation of Virtual Environnment
|
||||||
package { $proxmox::hypervisor::ve_pkg_name:
|
package { $proxmox::hypervisor::ve_pkg_name:
|
||||||
|
@ -60,6 +35,34 @@ class proxmox::hypervisor::install {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else { # If the system run on a standard Debian Kernel
|
||||||
|
|
||||||
|
# To avoid unwanted reboot (kernel update for example), the PVE kernel is
|
||||||
|
# installed only if the system run on a standard Debian.
|
||||||
|
# You will need to update your PVE kernel manually.
|
||||||
|
|
||||||
|
# Installation of the PVE Kernel
|
||||||
|
if $proxmox::hypervisor::kvm_only == true {
|
||||||
|
notify { "Need to REBOOT the system on the new PVE kernel (${proxmox::hypervisor::kernel_kvm_pkg_name}) ...": }
|
||||||
|
->
|
||||||
|
package { $proxmox::hypervisor::kernel_kvm_pkg_name:
|
||||||
|
ensure => $proxmox::hypervisor::ve_pkg_ensure,
|
||||||
|
notify => Exec['update_grub','reboot_to_pve'],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
notify { "Need to REBOOT the system on the new PVE kernel (${proxmox::hypervisor::kernel_pkg_name}) ...": }
|
||||||
|
->
|
||||||
|
package { $proxmox::hypervisor::kernel_pkg_name:
|
||||||
|
ensure => $proxmox::hypervisor::ve_pkg_ensure,
|
||||||
|
notify => Exec['update_grub','grub_reboot'],
|
||||||
|
}
|
||||||
|
# The kernel that allow KVM + OpenVZ is older than the standard Debian's
|
||||||
|
# kernel, so grub reboot must be used
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Ensure the grub is update
|
# Ensure the grub is update
|
||||||
exec { 'update_grub':
|
exec { 'update_grub':
|
||||||
|
|
Loading…
Reference in New Issue