diff --git a/states/haproxy/templates/haproxy.cfg.j2 b/states/haproxy/templates/haproxy.cfg.j2 index 19e6f0d..dde668b 100644 --- a/states/haproxy/templates/haproxy.cfg.j2 +++ b/states/haproxy/templates/haproxy.cfg.j2 @@ -95,6 +95,10 @@ global maxconn 1000 set-var proc.country str('{{ country }}') set-var proc.location str('{{ location }}') + + # Lua + tune.lua.maxmem {{ haproxy.config.lua_max_mem }} + tune.lua.bool-sample-conversion normal lua-prepend-path {{ haproxy.config.dir }}/mods/?.so cpath lua-prepend-path {{ haproxy.config.dir }}/scripts/?.lua {%- for script,params in haproxy.config.scripts.items() %} @@ -102,6 +106,7 @@ global lua-load {{ haproxy.config.dir }}/{{ params.path }} {% if "args" in params.keys() %}{{ params.args|join(" ") }}{% endif %} {%- endif %} {%- endfor %} + {%- if haproxy.config.api.enable %} {{ api() }} {%- endif %} @@ -114,7 +119,6 @@ global ssl-default-server-ciphers {{ haproxy.config.ssl_ciphers|join(":") }} ssl-default-server-options {{ haproxy.config.ssl_options|join(" ") }} - tune.lua.maxmem {{ haproxy.config.lua_max_mem }} {% if haproxy.config.quic|default(true) %} expose-experimental-directives .if feature(QUIC)