blob: b4ec8063dc659c64596ff5c1afff4ed046317d21 [file] [log] [blame]
{%- from "logrotate/map.jinja" import server with context -%}
# see "man logrotate" for details
# rotate log files weekly
{{ server.global_conf.rotate }}
{%- if grains['os_family'] == "Debian" %}
# use the syslog group by default, since this is the owning group
# of /var/log/syslog.
su root syslog
{%- endif %}
# keep 4 weeks worth of backlogs
rotate {{ server.global_conf.keep_rotate }}
# create new (empty) log files after rotating old ones
create
{%- if server.global_conf.dateext %}
# use date as a suffix of the rotated file
dateext
{%- endif %}
# uncomment this if you want your log files compressed
{%- if server.global_conf.compress %}
compress
{%- else %}
#compress
{%- endif %}
{%- if server.global_conf.maxsize is defined %}
maxsize {{ server.global_conf.maxsize }}
{%- endif %}
# packages drop log rotation information into this directory
include /etc/logrotate.d
# no packages own wtmp, or btmp -- we'll rotate them here
/var/log/wtmp {
missingok
monthly
create 0664 root utmp
rotate 1
}
/var/log/btmp {
missingok
monthly
create 0660 root utmp
rotate 1
}
# system-specific logs may be configured here
{#-
vim: syntax=jinja
-#}