38 lines
1.0 KiB
Plaintext
Raw Normal View History

2015-07-29 23:55:31 -07:00
# keepalived configuration
#
# **** DO NOT EDIT THIS FILE ****
#
# This file is managed by Salt.
# Any changes will be overwritten.
2016-10-23 19:17:58 -04:00
{{ '\n' }}
2016-10-23 20:50:06 -04:00
{%- import_yaml 'keepalived/defaults.yaml' as keepalived_defaults -%}
2016-10-23 18:56:24 -04:00
{%- set keepalived_final_values = salt.pillar.get(
2016-10-23 19:29:26 -04:00
'keepalived',
2016-10-23 18:56:24 -04:00
default=keepalived_defaults,
2016-10-23 20:50:06 -04:00
merge=True) -%}
2016-10-23 18:56:24 -04:00
2016-10-23 19:44:51 -04:00
{%- macro config_entries(data, indents) -%}
2016-10-23 20:02:12 -04:00
{%- if data is string or data is number -%}
2016-10-23 20:53:01 -04:00
{{ data|string|indent(indents, True) }}{{ '\n' }}
2016-10-23 20:11:55 -04:00
{%- else -%}
{%- if indents != 0 -%}
2016-10-23 20:15:45 -04:00
{{- " {\n" -}}
{%- endif -%}
2016-10-23 20:11:55 -04:00
{%- if data is mapping -%}
{%- for entry in data|dictsort -%}
2016-10-23 20:43:55 -04:00
{{ entry[0]|indent(indents, True) }}{{ ' ' }}
2016-10-23 20:02:12 -04:00
{{- config_entries(entry[1], indents + 2) -}}
2016-10-23 20:11:55 -04:00
{%- endfor -%}
2016-10-23 20:37:27 -04:00
{%- else -%}
{%- for entry in data -%}
{{- config_entries(entry, indents + 2) -}}
{%- endfor -%}
2016-10-23 20:11:55 -04:00
{%- endif -%}
{%- if indents != 0 -%}
{{ '}'|indent(indents - 2, True) }}{{ '\n' }}
{%- endif -%}
2016-10-23 18:56:24 -04:00
{%- endif -%}
{%- endmacro -%}
2016-10-23 19:03:11 -04:00
2016-10-23 19:44:51 -04:00
{{ config_entries(keepalived_final_values, 0) }}