proxmox/manifests/hypervisor/service.pp

46 lines
1.1 KiB
ObjectPascal
Raw Normal View History

# == 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'
}
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,
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,
}
}
}
} # Private class: proxmox::hypervisor::service