Skip to content

Commit d8d86ca

Browse files
authored
Merge pull request #58 from cathode911/master
added mode selection for stats socket in global definitions
2 parents b69c7ed + e7cddfe commit d8d86ca

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Currently, only a handful of options can be set using the pillar:
3535

3636
- Global
3737

38-
+ stats: enable stats, curently only via a unix socket which can be set to a path
38+
+ stats: enable stats, curently only via a unix socket which can be set to a path with custom permissions
3939
+ user: sets the user haproxy shall run as
4040
+ group: sets the group haproxy shall run as
4141
+ chroot: allows you to turn on chroot and set a directory

haproxy/templates/haproxy.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ global
3434
daemon
3535
{%- endif %}
3636
{%- if salt['pillar.get']('haproxy:global:stats:enable', 'no') == True %}
37-
stats socket {{ salt['pillar.get']('haproxy:global:stats:socketpath', '/tmp/ha_stats.sock') }} level {{ salt['pillar.get']('haproxy:global:stats:level', 'operator') }}
37+
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') }}
3838
{%- endif %}
3939
{%- if 'maxconn' in salt['pillar.get']('haproxy:global', {}) %}
4040
maxconn {{ salt['pillar.get']('haproxy:global:maxconn') }}

pillar.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ haproxy:
1010
stats:
1111
enable: True
1212
socketpath: /var/lib/haproxy/stats
13+
mode: 660
1314
level: admin
1415
ssl-default-bind-ciphers: "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384"
1516
ssl-default-bind-options: "no-sslv3 no-tlsv10 no-tlsv11"

0 commit comments

Comments
 (0)