From 33205b397fee31404a58bf7f583ab86954ffe818 Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Sun, 19 Feb 2023 12:21:59 +0100 Subject: [PATCH] updated haproxy state --- states/haproxy/defaults.yaml | 3 +++ states/haproxy/templates/haproxy.cfg.j2 | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/states/haproxy/defaults.yaml b/states/haproxy/defaults.yaml index 5934d55..26bb177 100644 --- a/states/haproxy/defaults.yaml +++ b/states/haproxy/defaults.yaml @@ -3,6 +3,9 @@ haproxy: enabled: true packages: - haproxy + - libcurl4-openssl-dev + - libmaxminddb-dev + - libjansson-dev maps: - access - domains diff --git a/states/haproxy/templates/haproxy.cfg.j2 b/states/haproxy/templates/haproxy.cfg.j2 index c9e11cf..073d973 100644 --- a/states/haproxy/templates/haproxy.cfg.j2 +++ b/states/haproxy/templates/haproxy.cfg.j2 @@ -135,8 +135,11 @@ frontend http from {{ haproxy.config.namespace }} # Default HTTPS frontend frontend https from {{ haproxy.config.namespace }} +.if feature(QUIC) + bind quic4@*:{{ haproxy.config.https_port }},quic6@:::{{ haproxy.config.https_port }} v4v6 ssl crt {{ haproxy.config.acme_fullchains_dir }}{% if haproxy.config.http2 %} alpn h3,h2,http/1.1{% endif %} name https +.else bind *:{{ haproxy.config.https_port }},:::{{ haproxy.config.https_port }} v4v6 ssl crt {{ haproxy.config.acme_fullchains_dir }}{% if haproxy.config.http2 %} alpn h2,http/1.1{% endif %} name https - #bind quic4@*:{{ haproxy.config.https_port }},quic6@:::{{ haproxy.config.https_port }} v4v6 ssl crt {{ haproxy.config.acme_fullchains_dir }}{% if haproxy.config.http2 %} alpn h2,http/1.1{% endif %} +.endif mode http option httplog {% for name, service in haproxy.config.spoe.items() %}