homeserver-iac/roles/haproxy/templates/haproxy.cfg.j2

27 lines
545 B
Plaintext
Raw Normal View History

2023-08-23 18:22:50 -04:00
defaults
log global
mode tcp
timeout connect 10s
timeout client 36h
timeout server 36h
2023-09-03 20:09:56 -04:00
balance leastconn
2023-08-23 18:22:50 -04:00
{% if groups["gitea"] | length > 0 %}
listen gitea_ssh
bind *:2499
option tcp-check
tcp-check expect rstring SSH-2.0-OpenSSH.*
{% for host in groups["gitea"] %}
2023-09-03 20:09:56 -04:00
server {{ host }} {{ host }}:2498
2023-08-23 18:22:50 -04:00
{% endfor %}
2023-09-03 20:09:56 -04:00
{% endif %}
2023-08-23 18:22:50 -04:00
2023-09-03 20:09:56 -04:00
{% if groups["syncthing"] | length > 0 and "syncthing" not in group_names %}
listen syncthing
bind *:22000
{% for host in groups["syncthing"] %}
server {{ host }} {{ host }}:22000
{% endfor %}
2023-08-23 18:22:50 -04:00
{% endif %}