---

- name: Compress previous version
  command: tar cJf {{ seafile_root_dir }}/archives/{{ seafile_current_version.stdout }}.txz ./
  environment:
    XZ_OPT: -T0
  args:
    chdir: "{{ seafile_root_dir }}/archives/{{ seafile_current_version.stdout }}"
  tags: seafile

- name: Remove archive directory
  file: path={{ seafile_root_dir }}/archives/{{ seafile_current_version.stdout }} state=absent
  tags: seafile

