{% continue %}
{% endif %}
{% if "<" in line or "" in line %}
{% if "#" not in line %}
{{ i }}
{{ line }}
{% continue %}
{% endif %}
{% endif %}
{% if "#" in line %}
{{ i }}
{% continue %}
{% endif %}
{% if line|length > 1 %}
{{ i }}
{{ line }}
{% endif %}
{% elif service == 'keepalived' %}
{%- if "global_defs {" in line -%}
{% if i > 1 %}
{% endif %}
{% continue %}
{% endif %}
{%- if "vrrp_instance " in line -%}
{% if i > 1 %}
{% endif %}
{% continue %}
{% endif %}
{%- if "virtual_server " in line -%}
{% if i > 1 %}
{% endif %}
{% continue %}
{% endif %}
{%- if "vrrp_script " in line -%}
{% if i > 1 %}
{% endif %}
{% continue %}
{% endif %}
{% if "state " in line or "interface" in line or "priority" in line or "}" in line %}
{% if "#" not in line %}
{{ i }}
{{ line }}
{% continue %}
{% endif %}
{% endif %}
{% if "#" in line %}
{{ i }}
{% continue %}
{% endif %}
{% if line|length > 1 %}
{{ i }}
{{ line }}
{% endif %}
{% else %}
{% if line.startswith('global') %}
{{ line }}
{% if role %}
{% if service != 'keepalived' %}
Edit
{% endif %}
{% endif %}
{% continue %}
{% endif %}
{% if line.startswith('defaults') %}
{{ line }}
{% if role %}
Edit
{% endif %}
{% continue %}
{% endif %}
{%- if line.startswith('listen') -%}
{{- line -}}
{% if role %}
Edit/Delete
{% endif %}
{%- set backend = line.split(' ') -%}
Stats
{%- set backend = backend|join('_') -%}
{%- do section_name.update({i: backend}) -%}
{% continue %}
{%- endif -%}
{%- if line.startswith('frontend') -%}
{{ line }}
{% if role %}
Edit/Delete
{% endif %}
{% set backend = line.split(' ') %}
Stats
{% set backend = backend|join('_') %}
{% do section_name.update({i: backend}) %}
{% continue %}
{%- endif -%}
{% if line.startswith('backend') %}
{{ line }}
{% if role %}
Edit/Delete
{% endif %}
{% set backend = line.split(' ') %}
Stats
{% continue %}
{% endif %}
{% if line.startswith('cache') %}
{{ line }}
{% if role %}
Edit/Delete
{% endif %}
{% continue %}
{% endif %}
{% if line.startswith('peers') %}
{{ line }}
{% if role %}
Edit/Delete
{% endif %}
{% continue %}
{% endif %}
{% if line.startswith('resolvers') %}
{{ line }}
{% if role %}
Edit/Delete
{% endif %}
{% continue %}
{% endif %}
{% if line.startswith('userlist') %}
{{ line }}
{% if role %}
Edit/Delete
{% endif %}
{% continue %}
{% endif %}
{% if line.startswith('http-errors') %}
{{ line }}
{% if role %}
Edit/Delete
{% endif %}
{% continue %}
{% endif %}
{% if "acl" in line or "option" in line or "server" in line %}
{% if "timeout" not in line and "default-server" not in line and "#use_backend" not in line and "#" not in line%}
{{ i }}
{{ line }}
{% continue %}
{% endif %}
{% endif %}
{% if line.startswith("#") %}
{{ i }}
{% continue %}
{% endif %}
{% if line|length > 1 %}
{{ i }}
{{ line }}
{% endif %}
{%- if "bind" in line and "@" not in line and "-" not in line -%}
{%- set bind = line.split(':')[1] -%}
{%- set bind = bind.split(' ') -%}
{%- endif -%}
{%- endif -%}
{%- endfor -%}
{% if configver %}