{% set i = 0 -%}
{% set section_name = {} %}
{% for line in conf -%}
{% set i = i + loop.index0 %}
{% if not role %}
{% if line.startswith('#HideBlockStart') %}
{% continue %}
{% endif %}
{% endif %}
{% if line.startswith('global') %}
{{ line }}
{% if role %}
Edit
{% endif %}
{% continue %}
{% endif %}
{% if line.startswith('defaults') %}
{{ line }}
{% if role %}
Edit
{% endif %}
{% continue %}
{% endif %}
{%- if line.startswith('listen') -%}
{{- line -}}
{% if role %}
Edit
{% 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
{% 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
{% endif %}
{% set backend = line.split(' ') %}
Stats
{% continue %}
{% endif %}
{% if line.startswith('cache') %}
{{ line }}
{% if role %}
Edit
{% endif %}
{% continue %}
{% endif %}
{% if line.startswith('peers') %}
{{ line }}
{% if role %}
Edit
{% endif %}
{% continue %}
{% endif %}
{% if line.startswith('userlist') %}
{{ line }}
{% if role %}
Edit
{% 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("#") %}
{% continue %}
{% endif %}
{% if line|length > 1 %}
{{ i }}
{{ line }}
{% endif %}
{%- if "bind" in line -%}
{%- set bind = line.split(':') -%}
{%- endif -%}
{%- endfor -%}
{% if configver %}