Added null string handler.
This commit is contained in:
parent
5e4e5d8b4a
commit
50fdd24d42
@ -14,7 +14,7 @@
|
|||||||
{%- set groupings = ['vrrp_script', 'vrrp_sync_group', 'vrrp_instance',
|
{%- set groupings = ['vrrp_script', 'vrrp_sync_group', 'vrrp_instance',
|
||||||
'virtual_server_group', 'virtual_server', 'real_server'] -%}
|
'virtual_server_group', 'virtual_server', 'real_server'] -%}
|
||||||
{%- macro config_entries(data, indents, carryover='') -%}
|
{%- macro config_entries(data, indents, carryover='') -%}
|
||||||
{%- if data is string or data is number -%}
|
{%- if data is string or data is number or data is not defined -%}
|
||||||
{{ data|string|indent(indents, True) }}{{ '\n' }}
|
{{ data|string|indent(indents, True) }}{{ '\n' }}
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
{%- if indents != 0 and not carryover -%}
|
{%- if indents != 0 and not carryover -%}
|
||||||
@ -29,10 +29,8 @@
|
|||||||
{{ carryover|indent(indents, True) }}{{ ' ' }}
|
{{ carryover|indent(indents, True) }}{{ ' ' }}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{{ entry[0]|indent(indents, True) }}
|
{{ entry[0]|indent(indents, True) }}
|
||||||
{%- if entry[1] is defined -%}
|
|
||||||
{{- config_entries(entry[1], indents + 2) -}}
|
{{- config_entries(entry[1], indents + 2) -}}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endif -%}
|
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
{%- for entry in data -%}
|
{%- for entry in data -%}
|
||||||
|
Loading…
Reference in New Issue
Block a user