Skip to content
Snippets Groups Projects
Commit 5c299064 authored by Mathieu Massé's avatar Mathieu Massé
Browse files

Add optional extra arguments to the stats socket

parent e4e6b28b
Branches
No related tags found
No related merge requests found
...@@ -35,7 +35,7 @@ Currently, only a handful of options can be set using the pillar: ...@@ -35,7 +35,7 @@ Currently, only a handful of options can be set using the pillar:
- Global - Global
+ stats: enable stats, curently only via a unix socket which can be set to a path with custom permissions + stats: enable stats, currently only via a unix socket which can be set to a path with custom permissions and optional extra bind arguments
+ user: sets the user haproxy shall run as + user: sets the user haproxy shall run as
+ group: sets the group haproxy shall run as + group: sets the group haproxy shall run as
+ chroot: allows you to turn on chroot and set a directory + chroot: allows you to turn on chroot and set a directory
......
...@@ -40,7 +40,7 @@ global ...@@ -40,7 +40,7 @@ global
daemon daemon
{%- endif %} {%- endif %}
{%- if salt['pillar.get']('haproxy:global:stats:enable', 'no') == True %} {%- if salt['pillar.get']('haproxy:global:stats:enable', 'no') == True %}
stats socket {{ salt['pillar.get']('haproxy:global:stats:socketpath', '/tmp/ha_stats.sock') }} mode {{ salt['pillar.get']('haproxy:global:stats:mode', '660') }} level {{ salt['pillar.get']('haproxy:global:stats:level', 'operator') }} stats socket {{ salt['pillar.get']('haproxy:global:stats:socketpath', '/tmp/ha_stats.sock') }} mode {{ salt['pillar.get']('haproxy:global:stats:mode', '660') }} level {{ salt['pillar.get']('haproxy:global:stats:level', 'operator') }}{% if 'extra' in salt['pillar.get']('haproxy:global:stats', {}) %} {{ salt['pillar.get']('haproxy:global:stats:extra') }}{% endif %}
{%- endif %} {%- endif %}
{%- if 'maxconn' in salt['pillar.get']('haproxy:global', {}) %} {%- if 'maxconn' in salt['pillar.get']('haproxy:global', {}) %}
maxconn {{ salt['pillar.get']('haproxy:global:maxconn') }} maxconn {{ salt['pillar.get']('haproxy:global:maxconn') }}
......
...@@ -22,6 +22,8 @@ haproxy: ...@@ -22,6 +22,8 @@ haproxy:
socketpath: /var/lib/haproxy/stats socketpath: /var/lib/haproxy/stats
mode: 660 mode: 660
level: admin level: admin
# Optional extra bind parameter, for example to set the owner/group on the socket file
extra: user haproxy group haproxy
ssl-default-bind-ciphers: "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384" ssl-default-bind-ciphers: "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384"
ssl-default-bind-options: "no-sslv3 no-tlsv10 no-tlsv11" ssl-default-bind-options: "no-sslv3 no-tlsv10 no-tlsv11"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment