Skip to content

Commit a6fdc06

Browse files
authored
Merge pull request #77 from MonolithProjects/master
add frontend maxconn and server-state options
2 parents 7a8e75c + 7b206d0 commit a6fdc06

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ haproxy_global_logs:
5555
# - 2 1
5656
haproxy_global_tunes:
5757
- tune.ssl.default-dh-param: 2048
58+
# haproxy_global_server_state_base: current
5859

5960
# Default
6061
haproxy_default_logs:
@@ -83,6 +84,7 @@ haproxy_default_errorfiles:
8384
# haproxy_default_http_check:
8485
# haproxy_default_monitor_uri:
8586
# haproxy_default_unique_id_format:
87+
# haproxy_default_load_server_state_from_file: global
8688

8789
# Stats
8890
haproxy_stats: true

templates/etc/haproxy/haproxy-default.cfg.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,6 @@ defaults
4545
{% if haproxy_default_unique_id_format is defined and haproxy_default_unique_id_format | length %}
4646
unique-id-format {{ haproxy_default_unique_id_format }}
4747
{% endif %}
48+
{% if haproxy_default_load_server_state_from_file is defined and haproxy_default_load_server_state_from_file|length %}
49+
load-server-state-from-file {{ haproxy_default_load_server_state_from_file }}
50+
{% endif %}

templates/etc/haproxy/haproxy-frontend.cfg.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ frontend {{ name }}
120120
{% endif %}
121121
{% if value.default_backend is defined %}
122122
default_backend {{ value.default_backend }}
123+
{% endif %}
124+
{% if value.maxconn is defined %}
125+
maxconn {{ value.maxconn }}
123126
{% endif %}
124127
{% if value.unique_id_format is defined %}
125128
unique-id-format {{ value.unique_id_format }}

templates/etc/haproxy/haproxy-global.cfg.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,6 @@ global
7676
{% endfor %}
7777
{% endfor %}
7878
{% endif %}
79+
{% if haproxy_global_server_state_base is defined %}
80+
server-state-base {{ haproxy_global_server_state_base }}
81+
{% endif %}

0 commit comments

Comments
 (0)