Skip to content

Commit

Permalink
Merge pull request #58 from TheMonkeyBrain/haproxy_stats_timeouts
Browse files Browse the repository at this point in the history
Moved haproxy stats timeouts to variable
  • Loading branch information
goldyfruit authored May 30, 2022
2 parents 875c6ec + 4550074 commit 346d95d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ haproxy_stats_options:
- hide-version
haproxy_stats_listener_options:
- dontlog-normal
haproxy_stats_timeouts:
- client 100s
- server 100s
- connect 100s
- queue 100s

# SSL
haproxy_ssl_certificate: /etc/ssl/uoi.io/uoi.io.pem
Expand Down
5 changes: 5 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ haproxy_stats_options:
- show-node
- hide-version
haproxy_stats_listener_options: []
haproxy_stats_timeouts:
- client 100s
- server 100s
- connect 100s
- queue 100s

# SSL
haproxy_ssl_certificate: /etc/ssl/uoi.io/uoi.io.pem
Expand Down
9 changes: 5 additions & 4 deletions templates/etc/haproxy/haproxy-stats.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ listen stats
{% for listener_opt in haproxy_stats_listener_options %}
option {{ listener_opt }}
{% endfor %}
timeout client 100s
timeout server 100s
timeout connect 100s
timeout queue 100s
{% if haproxy_stats_timeouts is defined and haproxy_stats_timeouts|length %}
{% for timeout in haproxy_stats_timeouts %}
timeout {{ timeout }}
{% endfor %}
{% endif %}
{% endif %}

0 comments on commit 346d95d

Please sign in to comment.