From bb8e93654a62f426aa9e130e82903d9645b6b042 Mon Sep 17 00:00:00 2001 From: geywitz Date: Thu, 27 Jul 2023 17:37:23 +0200 Subject: [PATCH] add errorfiles for listen,backend and frontend --- templates/etc/haproxy/haproxy-backend.cfg.j2 | 5 +++++ templates/etc/haproxy/haproxy-frontend.cfg.j2 | 5 +++++ templates/etc/haproxy/haproxy-listen.cfg.j2 | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/templates/etc/haproxy/haproxy-backend.cfg.j2 b/templates/etc/haproxy/haproxy-backend.cfg.j2 index 2f31583..597ccf9 100644 --- a/templates/etc/haproxy/haproxy-backend.cfg.j2 +++ b/templates/etc/haproxy/haproxy-backend.cfg.j2 @@ -125,6 +125,11 @@ backend {{ name }} server {{ srv }} {% endfor %} {% endif %} + {% if value.errorfiles is defined %} + {% for errorfile in value.errorfiles %} + errorfile {{ errorfile }} + {% endfor %} + {% endif %} {% endfor %} {% endfor %} diff --git a/templates/etc/haproxy/haproxy-frontend.cfg.j2 b/templates/etc/haproxy/haproxy-frontend.cfg.j2 index 3c74c78..acc2e77 100644 --- a/templates/etc/haproxy/haproxy-frontend.cfg.j2 +++ b/templates/etc/haproxy/haproxy-frontend.cfg.j2 @@ -124,6 +124,11 @@ frontend {{ name }} {% if value.unique_id_format is defined %} unique-id-format {{ value.unique_id_format }} {% endif %} + {% if value.errorfiles is defined %} + {% for errorfile in value.errorfiles %} + errorfile {{ errorfile }} + {% endfor %} + {% endif %} {% endfor %} {% endfor %} diff --git a/templates/etc/haproxy/haproxy-listen.cfg.j2 b/templates/etc/haproxy/haproxy-listen.cfg.j2 index 3110556..f68bf23 100644 --- a/templates/etc/haproxy/haproxy-listen.cfg.j2 +++ b/templates/etc/haproxy/haproxy-listen.cfg.j2 @@ -136,6 +136,11 @@ listen {{ name }} {% if value.unique_id_format is defined %} unique-id-format {{ value.unique_id_format }} {% endif %} + {% if value.errorfiles is defined %} + {% for errorfile in value.errorfiles %} + errorfile {{ errorfile }} + {% endfor %} + {% endif %} {% endfor %} {% endfor %}