blob: a25a7f9f8cc7f196c5b5597d43d15d65b3e3cbe2 [file] [log] [blame]
## Default: Daily rotation with 52 rotations kept and maxsize/size at 100M
## Note : Logrotate job run as syslog user
{%- from "haproxy/map.jinja" import proxy with context %}
{%- if proxy.get('enabled', False) %}
job:
haproxy:
- files:
- /var/log/haproxy.log
options:
- su syslog syslog
- {{ proxy.get('logrotate', {}).get('interval', 'daily') }}
- rotate: {{ proxy.get('logrotate', {}).get('rotate', 52) }}
- size: {{ proxy.get('logrotate', {}).get('size', '100M') }}
- maxsize: {{ proxy.get('logrotate', {}).get('maxsize', '100M') }}
- missingok
- compress
- delaycompress
- notifempty
- postrotate:
invoke-rc.d rsyslog rotate >/dev/null 2>&1 || true
{%- endif %}