Skip to content

Commit

Permalink
Merge pull request #77 from MonolithProjects/master
Browse files Browse the repository at this point in the history
add frontend maxconn and server-state options
  • Loading branch information
goldyfruit committed May 10, 2024
2 parents 7a8e75c + 7b206d0 commit a6fdc06
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions templates/etc/haproxy/haproxy-default.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
3 changes: 3 additions & 0 deletions templates/etc/haproxy/haproxy-frontend.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
3 changes: 3 additions & 0 deletions templates/etc/haproxy/haproxy-global.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}

0 comments on commit a6fdc06

Please sign in to comment.