Puppet Class: monit::params
- Inherited by:
-
monit
- Defined in:
- manifests/params.pp
Overview
monit::config This class handles the module data.
6 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 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'manifests/params.pp', line 6
class monit::params {
# $caller_module_name is empty when inherited?
#iif $caller_module_name != $module_name {
# warning("${name} is not part of the public API of the ${module_name} module and should not be directly included in the manifest.")
#}
$package = 'monit'
$service = 'monit'
$check_interval = 120
$check_start_delay = 240
case $facts['os']['family'] {
'Debian': {
$conf_file = '/etc/monit/monitrc'
$conf_dir = '/etc/monit/conf.d'
$logfile = '/var/log/monit.log'
$idfile = '/var/lib/monit/id'
$statefile = '/var/lib/monit/state'
$eventqueue = true
$service_program = '/usr/sbin/service'
case $facts['os']['name'] {
'Debian': {
if versioncmp($facts['os']['release']['major'], '8') < 0 {
$init_system = 'sysv'
}
else {
$init_system = 'systemd'
$systemd_unitdir = '/lib/systemd/system'
}
}
'Ubuntu': {
$init_system = 'upstart'
}
default: {
fail("Unsupported os family: ${facts['os']['family']} operatingsystem: ${facts['os']['name']}, \
module ${module_name} only support operatingsystem Debian and Ubuntu on os family Debian")
}
}
}
'FreeBSD': {
$conf_file = '/usr/local/etc/monitrc'
$conf_dir = '/usr/local/etc/monit.d'
$logfile = '/var/log/monit'
$idfile = '/var/.monit.id'
$statefile = '/var/.monit.state'
$eventqueue = false
$service_program = '/usr/sbin/service'
$init_system = 'sysv'
}
'RedHat': {
$conf_file = '/etc/monit.conf'
$conf_dir = '/etc/monit.d'
$logfile = '/var/log/monit'
$idfile = undef
$statefile = undef
$eventqueue = false
$service_program = '/sbin/service'
if versioncmp($facts['os']['release']['major'], '7') < 0 {
$init_system = 'sysv'
}
else {
$init_system = 'systemd'
$systemd_unitdir = '/usr/lib/systemd/system'
}
}
default: {
fail("Unsupported os family: ${facts['os']['family']} operatingsystem: ${facts['os']['name']}, \
module ${module_name} only support os family Debian and RedHat")
}
}
}
|