munin-formula/munin/map.jinja
Marc Schiffbauer bd5a2669a5 munin/map.jinja: move lookup data to munin:. namespace
lookupup data has been in same namespace as the config data
which caused lokkup data ended up in the munin config files

To not clutter templates with ugly "if not lookup" statements
lookup data has been moved to a global "munin:" pillar namespace
2015-12-02 23:06:44 +01:00

66 lines
2.1 KiB
Django/Jinja

{% set munin_master = salt['grains.filter_by']({
'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',
},
'Arch': {
'package': 'munin',
'config': '/etc/munin/munin.conf',
'config_src': 'salt://munin/files/munin.conf',
'cron_service': '/etc/systemd/system/munin-cron.service',
'cron_timer': '/etc/systemd/system/munin-cron.timer',
},
}, merge=salt['pillar.get']('munin:lookup:master')) %}
{% set munin_node = salt['grains.filter_by']({
'Debian': {
'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',
},
'RedHat': {
'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',
},
'Arch': {
'package': 'munin-node',
'service': 'munin-node',
'config': '/etc/munin/munin-node.conf',
'config_src': 'salt://munin/files/munin-node.conf',
'plugin_dir': '/usr/lib/munin/plugins',
},
}, merge=salt['pillar.get']('munin:lookup:node')) %}
{% set net_ssleay = salt['grains.filter_by']({
'Debian': {
'package': 'libnet-ssleay-perl',
},
'RedHat': {
'package': 'perl-Net-SSLeay',
},
}, merge=salt['pillar.get']('net_ssleay:lookup')) %}
{% set munin_tls = salt['grains.filter_by']({
'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',
},
}, merge=salt['pillar.get']('munin:lookup:tls')) %}