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