Skip to content

Commit

Permalink
Merge pull request #37 from bmm-alc/master
Browse files Browse the repository at this point in the history
Allow to set file permission on haproxy.log file
  • Loading branch information
mrlesmithjr authored Apr 10, 2024
2 parents b66bd14 + dce1bd6 commit 845e630
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,7 @@ haproxy_syslog_servers:
# port: 514

haproxy_version: 2.0

# permission for file haproxy.log written by rsyslog
# must be quoted
haproxy_log_file_perms: '0640'
2 changes: 2 additions & 0 deletions templates/etc/rsyslog.d/49-haproxy.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# /dev/log to chroot'ed HAProxy processes
$AddUnixListenSocket /var/lib/haproxy/dev/log

$FileCreateMode {{ haproxy_log_file_perms }}

# Send HAProxy messages to a dedicated logfile
{% if (haproxy_enable_remote_syslog is defined and not haproxy_enable_remote_syslog) or haproxy_enable_remote_syslog is not defined %}
if $programname startswith 'haproxy' then /var/log/haproxy.log
Expand Down

0 comments on commit 845e630

Please sign in to comment.