Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion templates/etc/haproxy/backend.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,17 @@ backend {{ backend.name }}
{% if backend.cookie is defined %}
cookie {{ backend.cookie }}
{% endif %}
{% if backend.acl is defined %}
{% if backend.acl is mapping %}
{% for name, value in backend.acl.items() %}
acl {{ name }} {{ value }}
{% endfor %}
{% else %}
{% for acl in backend.acl | default([]) %}
acl {{ acl.string }}
acl {{ acl.string | default(acl) }}
{% endfor %}
{% endif %}
{% endif %}
{% for stick in backend.stick | default([]) %}
stick-table {{ stick.table }}
stick on {{ stick.stick_on }}
Expand Down
10 changes: 9 additions & 1 deletion templates/etc/haproxy/frontend.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,17 @@ frontend {{ frontend.name }}
{% for timeout in frontend.timeout | default([]) %}
timeout {{ timeout.type }} {{ timeout.timeout }}
{% endfor %}
{% if frontend.acl is defined %}
{% if frontend.acl is mapping %}
{% for name, value in frontend.acl.items() %}
acl {{ name }} {{ value }}
{% endfor %}
{% else %}
{% for acl in frontend.acl | default([]) %}
acl {{ acl.string }}
acl {{ acl.string | default(acl) }}
{% endfor %}
{% endif %}
{% endif %}
{% for capture in frontend.capture | default([]) %}
capture {{ capture.type }} {{ capture.name }} len {{ capture.length }}
{% endfor %}
Expand Down
10 changes: 9 additions & 1 deletion templates/etc/haproxy/listen.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,17 @@ listen {{ listen.name }}
{% for timeout in listen.timeout | default([]) %}
timeout {{ timeout.type }} {{ timeout.timeout }}
{% endfor %}
{% if listen.acl is defined %}
{% if listen.acl is mapping %}
{% for name, value in listen.acl.items() %}
acl {{ name }} {{ value }}
{% endfor %}
{% else %}
{% for acl in listen.acl | default([]) %}
acl {{ acl.string }}
acl {{ acl.string | default(acl) }}
{% endfor %}
{% endif %}
{% endif %}
{% for capture in listen.capture | default([]) %}
capture {{ capture.type }} {{ capture.name }} len {{ capture.length }}
{% endfor %}
Expand Down