Puppet Class: sensu::server::service
- Defined in:
- manifests/server/service.pp
Summary
Manages the Sensu server serviceOverview
Manages the Sensu server service
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'manifests/server/service.pp', line 7
class sensu::server::service (
Boolean $hasrestart = $::sensu::hasrestart,
$server_service_enable = $::sensu::server_service_enable,
$server_service_ensure = $::sensu::server_service_ensure,
) {
if $::sensu::manage_services {
case $::sensu::server {
true: {
$ensure = $server_service_ensure
$enable = $server_service_enable
}
default: {
$ensure = 'stopped'
$enable = false
}
}
# The server is only supported on Linux
if $::kernel == 'Linux' {
service { 'sensu-server':
ensure => $ensure,
enable => $enable,
hasrestart => $hasrestart,
subscribe => [
Class['sensu::package'],
Sensu_api_config[$::fqdn],
Class['sensu::redis::config'],
Class['sensu::rabbitmq::config'],
],
}
}
}
}
|