munin-formula/munin/files/munin.conf

36 lines
970 B
Plaintext

{% set config = pillar.get('munin_master', {}) -%}
{% set globals = config.get('globals', {}) -%}
{% set hosts = config.get('hosts', {}) -%}
{% set groups = config.get('groups', {}) -%}
#
# This config file is managed by salt.
#
{%- macro print_directive(directive, value) -%}
{%- if value is sameas true -%}
{{ directive }} yes
{%- elif value is sameas false %}
{{ directive }} no
{%- else -%}
{{ directive }} {{ value }}
{%- endif -%}
{%- endmacro %}
{% for directive, value in globals.iteritems() -%}
{{ print_directive(directive, value) }}
{% endfor %}
{%- for host, directives in hosts.iteritems() %}
[{{ host }}]
{%- for directive, value in directives.iteritems() %}
{{ print_directive(directive, value) }}
{%- endfor %}
{% endfor %}
{%- for group, directives in groups.iteritems() %}
[{{ group }}]
{%- for directive, value in directives.iteritems() %}
{{ print_directive(directive, value) }}
{%- endfor %}
{% endfor %}