2014-01-05 04:04:43 -05:00
|
|
|
{% 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 %}
|
|
|
|
|
2015-11-17 08:15:21 -05:00
|
|
|
{% for directive, value in globals.items() -%}
|
2014-01-05 04:04:43 -05:00
|
|
|
{{ print_directive(directive, value) }}
|
|
|
|
{% endfor %}
|
|
|
|
|
2015-11-17 08:15:21 -05:00
|
|
|
{%- for host, directives in hosts.items() %}
|
2014-01-05 04:04:43 -05:00
|
|
|
[{{ host }}]
|
2015-11-17 08:15:21 -05:00
|
|
|
{%- for directive, value in directives.items() %}
|
2014-01-05 04:04:43 -05:00
|
|
|
{{ print_directive(directive, value) }}
|
|
|
|
{%- endfor %}
|
|
|
|
{% endfor %}
|
|
|
|
|
2015-11-17 08:15:21 -05:00
|
|
|
{%- for group, directives in groups.items() %}
|
2014-01-05 04:04:43 -05:00
|
|
|
[{{ group }}]
|
2015-11-17 08:15:21 -05:00
|
|
|
{%- for directive, value in directives.items() %}
|
2014-01-05 04:04:43 -05:00
|
|
|
{{ print_directive(directive, value) }}
|
|
|
|
{%- endfor %}
|
|
|
|
{% endfor %}
|
2016-10-13 17:48:10 -04:00
|
|
|
|
|
|
|
{%- if config.get('formula_append') %}
|
|
|
|
{{ config.formula_append }}
|
|
|
|
{% endif %}
|