Matrix Docker Ansible eploy
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

42 lines
1.3 KiB

  1. ---
  2. - name: Check existence of matrix-backup-borg service
  3. ansible.builtin.stat:
  4. path: "{{ matrix_systemd_path }}/matrix-backup-borg.service"
  5. register: matrix_backup_borg_service_stat
  6. - name: Ensure matrix-backup-borg is stopped
  7. ansible.builtin.service:
  8. name: matrix-backup-borg
  9. state: stopped
  10. enabled: false
  11. daemon_reload: true
  12. register: stopping_result
  13. when: "matrix_backup_borg_service_stat.stat.exists | bool"
  14. - name: Ensure matrix-backup-borg.service doesn't exist
  15. ansible.builtin.file:
  16. path: "{{ matrix_systemd_path }}/matrix-backup-borg.service"
  17. state: absent
  18. when: "matrix_backup_borg_service_stat.stat.exists | bool"
  19. - name: Ensure matrix-backup-borg.timer doesn't exist
  20. ansible.builtin.file:
  21. path: "{{ matrix_systemd_path }}/matrix-backup-borg.timer"
  22. state: absent
  23. when: "matrix_backup_borg_service_stat.stat.exists | bool"
  24. - name: Ensure systemd reloaded after matrix-backup-borg.service removal
  25. ansible.builtin.service:
  26. daemon_reload: true
  27. when: "matrix_backup_borg_service_stat.stat.exists | bool"
  28. - name: Ensure Matrix borg paths don't exist
  29. ansible.builtin.file:
  30. path: "{{ matrix_backup_borg_base_path }}"
  31. state: absent
  32. - name: Ensure borg Docker image doesn't exist
  33. community.docker.docker_image:
  34. name: "{{ matrix_backup_borg_docker_image }}"
  35. state: absent