diff --git a/defaults/main.yml b/defaults/main.yml index 4825409..6b754f0 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -55,6 +55,7 @@ haproxy_global_logs: # - 2 1 haproxy_global_tunes: - tune.ssl.default-dh-param: 2048 +# haproxy_global_server_state_base: current # Default haproxy_default_logs: @@ -83,6 +84,7 @@ haproxy_default_errorfiles: # haproxy_default_http_check: # haproxy_default_monitor_uri: # haproxy_default_unique_id_format: +# haproxy_default_load_server_state_from_file: global # Stats haproxy_stats: true diff --git a/templates/etc/haproxy/haproxy-default.cfg.j2 b/templates/etc/haproxy/haproxy-default.cfg.j2 index cb9cfca..e132558 100644 --- a/templates/etc/haproxy/haproxy-default.cfg.j2 +++ b/templates/etc/haproxy/haproxy-default.cfg.j2 @@ -45,3 +45,6 @@ defaults {% if haproxy_default_unique_id_format is defined and haproxy_default_unique_id_format | length %} unique-id-format {{ haproxy_default_unique_id_format }} {% endif %} +{% if haproxy_default_load_server_state_from_file is defined and haproxy_default_load_server_state_from_file|length %} + load-server-state-from-file {{ haproxy_default_load_server_state_from_file }} +{% endif %} \ No newline at end of file diff --git a/templates/etc/haproxy/haproxy-frontend.cfg.j2 b/templates/etc/haproxy/haproxy-frontend.cfg.j2 index acc2e77..7d900cf 100644 --- a/templates/etc/haproxy/haproxy-frontend.cfg.j2 +++ b/templates/etc/haproxy/haproxy-frontend.cfg.j2 @@ -120,6 +120,9 @@ frontend {{ name }} {% endif %} {% if value.default_backend is defined %} default_backend {{ value.default_backend }} + {% endif %} + {% if value.maxconn is defined %} + maxconn {{ value.maxconn }} {% endif %} {% if value.unique_id_format is defined %} unique-id-format {{ value.unique_id_format }} diff --git a/templates/etc/haproxy/haproxy-global.cfg.j2 b/templates/etc/haproxy/haproxy-global.cfg.j2 index dc2e39e..bccde8e 100644 --- a/templates/etc/haproxy/haproxy-global.cfg.j2 +++ b/templates/etc/haproxy/haproxy-global.cfg.j2 @@ -76,3 +76,6 @@ global {% endfor %} {% endfor %} {% endif %} +{% if haproxy_global_server_state_base is defined %} + server-state-base {{ haproxy_global_server_state_base }} +{% endif %} \ No newline at end of file