skeleton with working munin.node state

This commit is contained in:
Kenny Do 2014-01-04 21:47:26 -08:00
parent 44d7277686
commit 000daf202e
6 changed files with 37 additions and 0 deletions

27
munin/map.jinja Normal file
View File

@ -0,0 +1,27 @@
{% 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',
},
}, merge=salt['pillar.get']('munin_master:lookup')) %}
{% 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',
},
'RedHat': {
'package': 'munin-node',
'service': 'munin-node',
'config': '/etc/munin/munin-node.conf',
'config_src': 'salt://munin/files/munin-node.conf',
},
}, merge=salt['pillar.get']('munin_node:lookup')) %}

0
munin/master/config.sls Normal file
View File

0
munin/master/init.sls Normal file
View File

0
munin/node/config.sls Normal file
View File

10
munin/node/init.sls Normal file
View File

@ -0,0 +1,10 @@
{% from "munin/map.jinja" import munin_node with context %}
munin_node:
pkg.installed:
- name: {{ munin_node.package }}
service.running:
- enable: True
- name: {{ munin_node.service }}
- require:
- pkg: {{ munin_node.package }}

0
pillar.example Normal file
View File