2017-11-02 08:46:21 -04:00
|
|
|
{## Start with defaults from defaults.sls ##}
|
|
|
|
{% import_yaml 'munin/defaults.yaml' as default_settings %}
|
|
|
|
|
|
|
|
{% set munin_master_settings = salt['grains.filter_by']({
|
2014-01-05 00:47:26 -05:00
|
|
|
'Debian': {
|
|
|
|
'package': 'munin',
|
|
|
|
'config': '/etc/munin/munin.conf',
|
|
|
|
'config_src': 'salt://munin/files/munin.conf',
|
|
|
|
},
|
|
|
|
'RedHat': {
|
|
|
|
'package': 'munin',
|
|
|
|
'config': '/etc/munin/munin.conf',
|
|
|
|
'config_src': 'salt://munin/files/munin.conf',
|
|
|
|
},
|
2017-03-09 04:30:32 -05:00
|
|
|
'Suse': {
|
|
|
|
'package': 'munin',
|
|
|
|
'config': '/etc/munin/munin.conf',
|
|
|
|
'config_src': 'salt://munin/files/munin.conf',
|
|
|
|
},
|
2015-09-10 15:29:46 -04:00
|
|
|
'Arch': {
|
|
|
|
'package': 'munin',
|
|
|
|
'config': '/etc/munin/munin.conf',
|
|
|
|
'config_src': 'salt://munin/files/munin.conf',
|
2015-11-28 23:50:33 -05:00
|
|
|
'cron_service': '/etc/systemd/system/munin-cron.service',
|
|
|
|
'cron_timer': '/etc/systemd/system/munin-cron.timer',
|
2015-09-10 15:29:46 -04:00
|
|
|
},
|
2015-12-02 17:31:37 -05:00
|
|
|
'Gentoo': {
|
|
|
|
'package': 'net-analyzer/munin',
|
|
|
|
'config': '/etc/munin/munin.conf',
|
|
|
|
'config_src': 'salt://munin/files/munin.conf',
|
|
|
|
},
|
2017-11-02 08:46:21 -04:00
|
|
|
'FreeBSD': {
|
|
|
|
'package': 'munin-master',
|
|
|
|
'config': '/usr/local/etc/munin/munin.conf',
|
|
|
|
'config_src': 'salt://munin/files/munin.conf',
|
|
|
|
'file_group': 'wheel',
|
|
|
|
},
|
2015-12-02 17:06:44 -05:00
|
|
|
}, merge=salt['pillar.get']('munin:lookup:master')) %}
|
2014-01-05 00:47:26 -05:00
|
|
|
|
2017-11-02 08:46:21 -04:00
|
|
|
{% set munin_master = default_settings.copy() %}
|
|
|
|
{% munin_master.update(munin_master_settings %}
|
|
|
|
|
|
|
|
|
|
|
|
{% set munin_node_settings = salt['grains.filter_by']({
|
2014-01-05 00:47:26 -05:00
|
|
|
'Debian': {
|
|
|
|
'package': 'munin-node',
|
|
|
|
'service': 'munin-node',
|
|
|
|
'config': '/etc/munin/munin-node.conf',
|
|
|
|
'config_src': 'salt://munin/files/munin-node.conf',
|
2015-10-02 00:38:55 -04:00
|
|
|
'plugin_dir': '/usr/share/munin/plugins',
|
2014-01-05 00:47:26 -05:00
|
|
|
},
|
|
|
|
'RedHat': {
|
|
|
|
'package': 'munin-node',
|
|
|
|
'service': 'munin-node',
|
|
|
|
'config': '/etc/munin/munin-node.conf',
|
|
|
|
'config_src': 'salt://munin/files/munin-node.conf',
|
2015-10-02 00:38:55 -04:00
|
|
|
'plugin_dir': '/usr/share/munin/plugins',
|
2014-01-05 00:47:26 -05:00
|
|
|
},
|
2017-03-09 04:30:32 -05:00
|
|
|
'Suse': {
|
|
|
|
'package': 'munin-node',
|
|
|
|
'service': 'munin-node',
|
|
|
|
'config': '/etc/munin/munin-node.conf',
|
|
|
|
'config_src': 'salt://munin/files/munin-node.conf',
|
|
|
|
'plugin_dir': '/usr/share/munin/plugins',
|
|
|
|
},
|
2015-09-10 15:29:46 -04:00
|
|
|
'Arch': {
|
|
|
|
'package': 'munin-node',
|
|
|
|
'service': 'munin-node',
|
|
|
|
'config': '/etc/munin/munin-node.conf',
|
|
|
|
'config_src': 'salt://munin/files/munin-node.conf',
|
2015-10-02 00:38:55 -04:00
|
|
|
'plugin_dir': '/usr/lib/munin/plugins',
|
2015-09-10 15:29:46 -04:00
|
|
|
},
|
2015-12-02 17:31:37 -05:00
|
|
|
'Gentoo': {
|
|
|
|
'package': 'net-analyzer/munin',
|
|
|
|
'service': 'munin-node',
|
|
|
|
'config': '/etc/munin/munin-node.conf',
|
|
|
|
'config_src': 'salt://munin/files/munin-node.conf',
|
|
|
|
'plugin_dir': '/usr/libexec/munin/plugins',
|
|
|
|
},
|
2017-11-02 08:46:21 -04:00
|
|
|
'FreeBSD': {
|
|
|
|
'package': 'munin-node',
|
|
|
|
'service': 'munin-node',
|
|
|
|
'config': '/usr/local/etc/munin/munin-node.conf',
|
|
|
|
'config_src': 'salt://munin/files/munin-node.conf',
|
|
|
|
'plugin_dir': '/usr/local/etc/munin/plugins',
|
|
|
|
'file_group': 'wheel',
|
|
|
|
},
|
2015-12-02 17:06:44 -05:00
|
|
|
}, merge=salt['pillar.get']('munin:lookup:node')) %}
|
2014-01-06 01:34:51 -05:00
|
|
|
|
2017-11-02 08:46:21 -04:00
|
|
|
{% set munin_node = default_settings.copy() %}
|
|
|
|
{% munin_node.update(munin_node_settings %}
|
|
|
|
|
|
|
|
|
|
|
|
{% set net_ssleay_settings = salt['grains.filter_by']({
|
2014-01-06 01:34:51 -05:00
|
|
|
'Debian': {
|
|
|
|
'package': 'libnet-ssleay-perl',
|
|
|
|
},
|
|
|
|
'RedHat': {
|
|
|
|
'package': 'perl-Net-SSLeay',
|
|
|
|
},
|
2015-12-02 17:37:05 -05:00
|
|
|
'Gentoo': {
|
|
|
|
'package': 'dev-perl/Net-SSLeay',
|
|
|
|
},
|
2017-11-02 08:46:21 -04:00
|
|
|
'FreeBSD': {
|
|
|
|
'package': 'perl-Net-SSLeay',
|
|
|
|
},
|
2014-01-06 01:34:51 -05:00
|
|
|
}, merge=salt['pillar.get']('net_ssleay:lookup')) %}
|
2014-01-06 20:38:14 -05:00
|
|
|
|
2017-11-02 08:46:21 -04:00
|
|
|
{% set munin_ssleay = default_settings.copy() %}
|
|
|
|
{% munin_ssleay.update(munin_ssleay_settings %}
|
|
|
|
|
|
|
|
|
|
|
|
{% set munin_tls_settings = salt['grains.filter_by']({
|
2014-01-06 20:38:14 -05:00
|
|
|
'Debian': {
|
|
|
|
'private_key': '/etc/munin/tls/key.pem',
|
|
|
|
'certificate': '/etc/munin/tls/crt.pem',
|
|
|
|
'ca_certificate': '/etc/munin/tls/cacert.pem',
|
|
|
|
},
|
|
|
|
'RedHat': {
|
|
|
|
'private_key': '/etc/munin/tls/key.pem',
|
|
|
|
'certificate': '/etc/munin/tls/crt.pem',
|
|
|
|
'ca_certificate': '/etc/munin/tls/cacert.pem',
|
|
|
|
},
|
2015-12-02 17:37:05 -05:00
|
|
|
'Gentoo': {
|
|
|
|
'private_key': '/etc/munin/tls/key.pem',
|
|
|
|
'certificate': '/etc/munin/tls/crt.pem',
|
|
|
|
'ca_certificate': '/etc/munin/tls/cacert.pem',
|
|
|
|
},
|
2017-11-02 08:46:21 -04:00
|
|
|
'FreeBSD': {
|
|
|
|
'private_key': '/usr/local/etc/munin/tls/key.pem',
|
|
|
|
'certificate': '/usr/local/etc/munin/tls/crt.pem',
|
|
|
|
'ca_certificate': '/usr/local/etc/munin/tls/cacert.pem',
|
|
|
|
},
|
2015-12-02 17:06:44 -05:00
|
|
|
}, merge=salt['pillar.get']('munin:lookup:tls')) %}
|
2017-11-02 08:46:21 -04:00
|
|
|
|
|
|
|
{% set munin_tls = default_settings.copy() %}
|
|
|
|
{% munin_tls.update(munin_tls_settings %}
|
|
|
|
|