diff --git a/roles/seafile/tasks/install.yml b/roles/seafile/tasks/install.yml index 868bfe4..3e7af39 100644 --- a/roles/seafile/tasks/install.yml +++ b/roles/seafile/tasks/install.yml @@ -288,3 +288,17 @@ dest: /usr/local/bin/seafpy mode: 0755 tags: seafile + +- name: Deploy script to run garbage collector + template: src=gc.sh.j2 dest={{ seafile_root_dir }}/seafile-server/gc.sh mode=0755 + tags: seafile + +- name: Add a cron job for garbage collector + cron: + name: seafile_gc + special_time: weekly + user: root + job: '{{ seafile_root_dir }}/seafile-server/gc.sh' + cron_file: seafile_gc + state: present + tags: seafile