Skip to content

Commit

Permalink
Incorrect implementation fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-de-bock committed Nov 17, 2023
1 parent 3acc1b1 commit 320d201
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions templates/haproxy.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ frontend {{ frontend.name }}

{% for backend in haproxy_backends %}
backend {{ backend.name }}
{% if backend.httpcheck is defined and backend.httpcheck %}
{% if backend.httpcheck is defined and backend.httpcheck_method is defined and backend.httpcheck %}
option httpchk {% if backend.httpcheck_method is defined %}{{ backend.httpcheck_method }}{% endif %}
{% elif backend.httpcheck is defined and backend.httpcheck %}
option httpchk
{% endif %}

{% if backend.http_check is defined and backend.http_check is mapping %}
{% if backend.http_check is defined %}
http-check send meth {{ backend.http_check.send.method }} uri {{ backend.http_check.send.uri }}
http-check expect {{ backend.http_check.expect }}
{% elif backend.http_check is defined and backend.http_check is string %}
http-check {{ backend.http_check }}
{% endif %}
balance {{ backend.balance | default(haproxy_backend_default_balance) }}
mode {{ backend.mode | default('http') }}
Expand Down

0 comments on commit 320d201

Please sign in to comment.