# 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|string|indent(indents, True) }}{{ '\n' }} {%- else -%} {%- if indents != 0 -%} {{- "{\n" -}} {%- endif -%} {%- if data is mapping -%} {%- for entry in data|dictsort -%} {{ entry[0]|indent(indents, True) }}{{ ' ' }} {{- config_entries(entry[1], indents + 2) -}} {%- endfor -%} {%- else -%} {%- for entry in data -%} {{- config_entries(entry, indents) -}} {%- endfor -%} {%- endif -%} {%- if indents != 0 -%} {{ '}'|indent(indents - 2, True) }}{{ '\n' }} {%- endif -%} {%- endif -%} {%- endmacro -%} {{ config_entries(keepalived_final_values, 0) }}