From 213519da652d1be2d0f29ac17c381a1855f37895 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 8 Aug 2019 23:21:31 +0200 Subject: [PATCH] fix logrotate config --- defaults/main.yml | 7 ++++--- templates/etc/logrotate.d/config.j2 | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 032c901..1e50294 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -27,10 +27,11 @@ jellyfin_logrotate_config: - log: "{{ jellyfin_log_dir }}/jellyfin.log" options: - weekly - - rotate 4 - - maxsize 250K + - rotate 5 + - maxsize 512K - compress - - shred + - delaycompress + - "create 640 {{ jellyfin_user }} {{ jellyfin_group }}" jellyfin_packages_extra: [] diff --git a/templates/etc/logrotate.d/config.j2 b/templates/etc/logrotate.d/config.j2 index 5e0ede0..143734d 100644 --- a/templates/etc/logrotate.d/config.j2 +++ b/templates/etc/logrotate.d/config.j2 @@ -1,9 +1,11 @@ #jinja2: lstrip_blocks: True -# {{ ansible_managed }} +{{ ansible_managed | comment }} {{ item.log }} { {% for option in item.options %} {{ option }} {% endfor %} + copytruncate + sharedscripts postrotate /usr/bin/pkill -HUP rsyslogd endscript