Puppet Class: mosquitto::config
- Defined in:
-
manifests/config.pp
Summary
handle the Mosquitto configuration file
Overview
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'manifests/config.pp', line 8
class mosquitto::config (
Array[String[1]] $config = $mosquitto::config,
) {
assert_private()
case $facts['os']['family'] {
'FreeBSD': {
$etc_prefix = '/usr/local/etc'
$default_config = ['pid_file /var/run/mosquitto.pid', 'log_dest syslog']
}
default: {
$etc_prefix = '/etc'
$default_config = []
}
}
file { "${etc_prefix}/mosquitto/mosquitto.conf":
ensure => bool2str($mosquitto::package_ensure == 'absent', 'absent', 'file'),
content => epp("${module_name}/mosquitto.conf.epp", { 'config' => $config + $default_config }),
}
}
|