2015-01-09 19:13:05 +01:00
|
|
|
# == Class: proxmox::hypervisor::service
|
|
|
|
#
|
|
|
|
# Manage Proxmox services
|
|
|
|
#
|
|
|
|
class proxmox::hypervisor::service {
|
|
|
|
|
|
|
|
|
|
|
|
if $proxmox::hypervisor::pveproxy_service_enabled == true {
|
|
|
|
$pveproxy_service_ensure = 'running'
|
|
|
|
} else {
|
|
|
|
$pveproxy_service_ensure = 'stopped'
|
|
|
|
}
|
|
|
|
|
2015-02-03 16:16:36 +01:00
|
|
|
if $proxmox::hypervisor::vz_service_enabled == true {
|
|
|
|
$vz_service_ensure = 'running'
|
|
|
|
} else {
|
|
|
|
$vz_service_ensure = 'stopped'
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-01-09 19:13:05 +01:00
|
|
|
if $::is_proxmox == 'true' {
|
|
|
|
|
|
|
|
if $proxmox::hypervisor::pveproxy_service_manage == true {
|
2015-02-03 16:56:39 +01:00
|
|
|
service { $proxmox::hypervisor::pveproxy_service_name:
|
|
|
|
ensure => $pveproxy_service_ensure,
|
|
|
|
enable => $proxmox::hypervisor::pveproxy_service_enabled,
|
2015-01-09 19:13:05 +01:00
|
|
|
hasstatus => false,
|
|
|
|
hasrestart => true,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-02-03 16:16:36 +01:00
|
|
|
if $proxmox::hypervisor::vz_service_manage == true {
|
2015-02-03 16:56:39 +01:00
|
|
|
service { $proxmox::hypervisor::vz_service_name:
|
|
|
|
ensure => $vz_service_ensure,
|
|
|
|
enable => $proxmox::hypervisor::pveproxy_service_enabled,
|
2015-02-03 16:16:36 +01:00
|
|
|
hasstatus => true,
|
|
|
|
hasrestart => true,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-01-09 19:13:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} # Private class: proxmox::hypervisor::service
|