Files
configpolicy/roles/apache/templates/httpd.logrotate.j2
Dustin C. Hatch aa1ab75edd roles/apache: logrotate: Compress logs immediately
To conserve space on the log volume of web servers, "old" log files are
now compressed immediately, as opposed to waiting until the next
rotation.
2020-12-26 11:33:09 -06:00

18 lines
455 B
Django/Jinja

/var/log/httpd/*log {
missingok
notifempty
rotate {{ apache_keep_num_logs }}
maxsize {{ apache_max_log_size }}
sharedscripts
compress
compresscmd /usr/bin/xz
compressext .xz
postrotate
{% if ansible_distribution_major_version|int < 7 %}
/sbin/service httpd reload > /dev/null 2>/dev/null || true
{% else %}
/bin/systemctl reload httpd.service > /dev/null 2>/dev/null || true
{% endif %}
endscript
}