From 4a3a9b3505078db1b94b4a008cfa2fc964b79983 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Sun, 6 Dec 2020 18:00:07 +0100 Subject: [PATCH] Update to 2020-12-06 18:00 --- roles/seafile/tasks/conf.yml | 4 ++++ roles/seafile/tasks/install.yml | 1 + roles/seafile/templates/logrotate.conf.j2 | 7 +++++++ 3 files changed, 12 insertions(+) create mode 100644 roles/seafile/templates/logrotate.conf.j2 diff --git a/roles/seafile/tasks/conf.yml b/roles/seafile/tasks/conf.yml index b9c81c4..91fca64 100644 --- a/roles/seafile/tasks/conf.yml +++ b/roles/seafile/tasks/conf.yml @@ -43,3 +43,7 @@ template: src=admin.txt.j2 dest={{ seafile_root_dir }}/conf/admin.txt group={{ seafile_group }} mode=640 when: seafile_install_mode == 'install' tags: seafile + +- name: Deploy logrotate configuration + template: src=logrotate.conf.j2 dest=/etc/logrotate.d/seafile + tags: seafile diff --git a/roles/seafile/tasks/install.yml b/roles/seafile/tasks/install.yml index 0aed2ce..4b4991e 100644 --- a/roles/seafile/tasks/install.yml +++ b/roles/seafile/tasks/install.yml @@ -283,3 +283,4 @@ cron_file: seafile_gc state: present tags: seafile + diff --git a/roles/seafile/templates/logrotate.conf.j2 b/roles/seafile/templates/logrotate.conf.j2 new file mode 100644 index 0000000..e23a1cc --- /dev/null +++ b/roles/seafile/templates/logrotate.conf.j2 @@ -0,0 +1,7 @@ +{{ seafile_root_dir }}/logs/*.log { + weekly + rotate 52 + compress + missingok + copytruncate +}