{% set i = 0 -%}
{% for line in conf %}
{% set i = i + loop.index0 %}
{% if line.startswith('global') %}
{{ line }}
{% continue %}
{% endif %}
{% if line.startswith('defaults') %}
{{ line }}
{% continue %}
{% endif %}
{% if line.startswith('listen') %}
{{ line }}
{% continue %}
{% endif %}
{% if line.startswith('frontend') %}
{{ line }}
{% continue %}
{% endif %}
{% if line.startswith('backend') %}
{{ line }}
{% continue %}
{% endif %}
{% if line.startswith('cache') %}
{{ line }}
{% 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 %}
{% endfor %}
{% if configver %}