diff --git a/logrotate/files/FreeBSD/logrotate.conf b/logrotate/files/FreeBSD/logrotate.conf new file mode 100644 index 0000000..0fb981c --- /dev/null +++ b/logrotate/files/FreeBSD/logrotate.conf @@ -0,0 +1,23 @@ +# see "man logrotate" for details +# rotate log files weekly +weekly + +# keep 4 weeks worth of backlogs +rotate 4 + +# create new (empty) log files after rotating old ones +create + +# uncomment this if you want your log files compressed +compress + +# RPM packages drop log rotation information into this directory +include /usr/local/etc/logrotate.d + +# Example +#/var/log/lastlog { +# monthly +# rotate 1 +#} + +# system-specific logs may be configured here diff --git a/logrotate/map.jinja b/logrotate/map.jinja index 912fd87..7dce915 100644 --- a/logrotate/map.jinja +++ b/logrotate/map.jinja @@ -31,4 +31,12 @@ 'user' : 'root', 'group' : 'root', }, + 'FreeBSD': { + 'pkg' : 'logrotate', + 'service' : 'cron', + 'conf_file' : '/usr/local/etc/logrotate.conf', + 'include_dir' : '/usr/local/etc/logrotate.d', + 'user' : 'root', + 'group' : 'wheel', + }, }, merge=salt['pillar.get']('logrotate:lookup')) %}