From 75f971ae714152438d28dee5a1d287a5d029b679 Mon Sep 17 00:00:00 2001 From: Jeff Baskin Date: Sun, 23 Oct 2016 19:44:51 -0400 Subject: [PATCH] Adding indents. --- keepalived/templates/keepalived.jinja | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keepalived/templates/keepalived.jinja b/keepalived/templates/keepalived.jinja index bf582fd..a9e216f 100644 --- a/keepalived/templates/keepalived.jinja +++ b/keepalived/templates/keepalived.jinja @@ -11,14 +11,14 @@ default=keepalived_defaults, merge=True) %} -{%- macro config_entries(data) -%} +{%- macro config_entries(data, indents) -%} {%- if data is mapping -%} {%- for entry in data|dictsort -%} -{{ entry[0] }} { -{{ config_entries(entry[1]) }} +{{ entry[0]|indent(indents, True) }} { +{{ config_entries(entry[1], indents + 2) }} }{{ '\n' }} {%- endfor -%} {%- endif -%} {%- endmacro -%} -{{ config_entries(keepalived_final_values) }} +{{ config_entries(keepalived_final_values, 0) }}