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 +}