---

- name: Compress previous version
  command: tar cf {{ squashtm_root_dir }}/archives/{{ squashtm_current_version }}.tar.zst --use-compress-program=zstd ./
  args:
    chdir: "{{ squashtm_root_dir }}/archives/{{ squashtm_current_version }}"
    warn: False
  environment:
    ZSTD_CLEVEL: 10
    ZSTD_NBTHREADS: 0
  tags: squashtm

- name: Remove archive dir
  file: path={{ squashtm_root_dir }}/archives/{{ squashtm_current_version }} state=absent
  tags: squashtm
