diff --git a/defaults/main.yml b/defaults/main.yml index e665bc6..55ee346 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -32,6 +32,7 @@ haproxy_stats_bind_address: 127.0.0.1 haproxy_stats_port: 1936 haproxy_username: admin haproxy_stats_password: secrete +haproxy_stats_refresh_interval: 60 # Default haproxy backup nodes to empty list so this doesn't have to be # defined for each service. diff --git a/releasenotes/notes/refresh-interval-configuration-option-884d64aa259ecc3c.yaml b/releasenotes/notes/refresh-interval-configuration-option-884d64aa259ecc3c.yaml new file mode 100644 index 0000000..5f0a861 --- /dev/null +++ b/releasenotes/notes/refresh-interval-configuration-option-884d64aa259ecc3c.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + Deployers can set a refresh interval for haproxy's stats page by setting + the ``haproxy_stats_refresh_interval`` variable. The default value is + ``60``, which causes haproxy to refresh the stats page every 60 seconds. diff --git a/templates/haproxy.cfg.j2 b/templates/haproxy.cfg.j2 index fd669bd..1ffbf68 100644 --- a/templates/haproxy.cfg.j2 +++ b/templates/haproxy.cfg.j2 @@ -48,5 +48,5 @@ listen stats stats show-legends stats auth {{ haproxy_username }}:{{ haproxy_stats_password }} stats admin if TRUE - stats refresh 60s + stats refresh {{ haproxy_stats_refresh_interval }}s {% endif %}