ansible/roles/rsyslog_collector/templates/rotate-remote-logs.service.j2
Jeltz c65b3f090b
Some checks failed
continuous-integration/drone/push Build is failing
Compress and delete old remote logs
Logrotate is not used because I didn't found an easy way to configure it
to handle the compression/deletion of log files already rotated by
rsyslog (it is probably possible, but I found the script to be easier).
2021-03-01 03:58:58 +01:00

12 lines
313 B
Django/Jinja

{{ ansible_managed | comment }}
[Unit]
Description=Rotate remote logs
[Service]
User=root
Type=OneShot
ExecStart={{ rsyslog_collector_rotate_path }} \
--base-dir {{ rsyslog_collector_keep_days }} \
--compress-days {{ rsyslog_collector_compress_days }} \
--keep-days {{ rsyslog_collector_base_dir }}