Skip to content
Snippets Groups Projects
Commit 40c7ac8c authored by John Keates's avatar John Keates Committed by GitHub
Browse files

Merge pull request #50 from hoonetorg/feature/modular_log

allow to set arbitrary log options in global
parents 1c29ef81 cbcb50ad
No related branches found
No related tags found
No related merge requests found
......@@ -23,8 +23,14 @@
# Global settings
#------------------
global
{%- if salt['pillar.get']('haproxy:global:log', []) != [] %}
{%- for log in salt['pillar.get']('haproxy:global:log') %}
log {{log}}
{%- endfor %}
{%- else %}
log /dev/log local0
log /dev/log local1 notice
{%- endif %}
user {{ salt['pillar.get']('haproxy:global:user', 'haproxy') }}
group {{ salt['pillar.get']('haproxy:global:group', 'haproxy') }}
{%- if salt['pillar.get']('haproxy:global:chroot:enable', 'no') == True %}
......
......@@ -7,6 +7,9 @@ haproxy:
overwrite: True # Overwrite an existing config file if present (default behaviour unless set to false)
config_file_path: /etc/haproxy/haproxy.cfg
global:
log:
- 127.0.0.1 local2
- 127.0.0.1 local1 notice
stats:
enable: True
socketpath: /var/lib/haproxy/stats
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment