From 76bc908e3e99445947b95cf8478c7aa8557dac0c Mon Sep 17 00:00:00 2001 From: Bernd Fischbach Date: Mon, 7 Dec 2015 10:03:59 +0100 Subject: [PATCH] Added block statements (not parsed, simply looped and put in to the configuration) for frontends --- README.rst | 1 + haproxy/templates/haproxy.jinja | 3 +++ 2 files changed, 4 insertions(+) diff --git a/README.rst b/README.rst index 10cda13..e63bc27 100644 --- a/README.rst +++ b/README.rst @@ -59,6 +59,7 @@ Currently, only a handful of options can be set using the pillar: + reqadd: an array of reqadd statements. Looped over and put in the configuration, no parsing + default_backend: sets the default backend + acls: a list of acls, not parsed, simply looped and put in to the configuration + + blocks: a list of block statements, not parsed, simply looped and put in to the configuration + use_backends: a list of use_backend statements, looped over, not parsed - Backend; Backend(s) is a list of the backends you desire to have in your haproxy setup, per backend you can set: diff --git a/haproxy/templates/haproxy.jinja b/haproxy/templates/haproxy.jinja index 35d59ff..8b7832b 100644 --- a/haproxy/templates/haproxy.jinja +++ b/haproxy/templates/haproxy.jinja @@ -353,6 +353,9 @@ frontend {{ frontend.get('name', frontend_name) }} {%- if 'acls' in frontend %} {{- render_list_of_dictionaries('acl', frontend.acls) }} {%- endif %} + {%- if 'blocks' in frontend %} + {{- render_list_of_dictionaries('block', frontend.blocks) }} + {%- endif %} {%- if 'monitoruri' in frontend %} monitor-uri {{ frontend.monitoruri }} {%- endif %}