Puppet Class: kibana::service
- Defined in:
- manifests/service.pp
Overview
This class is meant to be called from kibana. It ensure the service is running. It is not meant to be called directly.
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 42 43 44 45 |
# File 'manifests/service.pp', line 7
class kibana::service {
if $kibana::ensure != 'absent' {
case $kibana::status {
# Stop service and disable on boot
'disabled': {
$_ensure = false
$_enable = false
}
# Start service and enable on boot
'enabled': {
$_ensure = true
$_enable = true
}
# Start service and disable on boot
'running': {
$_ensure = true
$_enable = false
}
# Ignore current state and disable on boot
'unmanaged': {
$_ensure = undef
$_enable = false
}
# Unknown status
default: {
fail('Invalid value for status')
}
}
} else {
# The package will be removed
$_ensure = false
$_enable = false
}
service { $kibana::service_name:
ensure => $_ensure,
enable => $_enable,
}
}
|