keepalived-formula/keepalived/templates/keepalived.jinja
2016-10-23 20:15:45 -04:00

30 lines
804 B
Django/Jinja

# keepalived configuration
#
# **** DO NOT EDIT THIS FILE ****
#
# This file is managed by Salt.
# Any changes will be overwritten.
{{ '\n' }}
{%- import_yaml 'keepalived/defaults.yaml' as keepalived_defaults %}
{%- set keepalived_final_values = salt.pillar.get(
'keepalived',
default=keepalived_defaults,
merge=True) %}
{%- macro config_entries(data, indents) -%}
{%- if data is string or data is number -%}
{{- " " }}{{ data }}{{ '\n' }}
{%- else -%}
{{- " {\n" -}}
{%- if data is mapping -%}
{%- for entry in data|dictsort -%}
{{ entry[0]|indent(indents, True) }}
{{- config_entries(entry[1], indents + 2) -}}
{%- endfor -%}
{%- endif -%}
{{ '}'|indent(indents, True) }}{{ '\n' }}
{%- endif -%}
{%- endmacro -%}
{{ config_entries(keepalived_final_values, 0) }}