Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

46 lines
1.2 KiB

  1. ---
  2. - name: Check existence of matrix-coturn service
  3. stat:
  4. path: "{{ matrix_systemd_path }}/matrix-coturn.service"
  5. register: matrix_coturn_service_stat
  6. when: "not matrix_coturn_enabled|bool"
  7. - name: Ensure matrix-coturn is stopped
  8. service:
  9. name: matrix-coturn
  10. state: stopped
  11. daemon_reload: yes
  12. when: "matrix_coturn_service_stat.stat.exists|bool"
  13. - name: Ensure matrix-coturn-reload.timer is stopped
  14. service:
  15. name: matrix-coturn
  16. state: stopped
  17. daemon_reload: yes
  18. failed_when: false
  19. when: "matrix_coturn_service_stat.stat.exists|bool"
  20. - name: Ensure systemd units don't exist
  21. file:
  22. path: "{{ matrix_systemd_path }}/{{ item }}"
  23. state: absent
  24. register: matrix_coturn_systemd_unit_uninstallation_result
  25. with_items:
  26. - matrix-coturn.service
  27. - matrix-coturn-reload.service
  28. - matrix-coturn-reload.timer
  29. - name: Ensure systemd reloaded after unit removal
  30. service:
  31. daemon_reload: yes
  32. when: "matrix_coturn_systemd_unit_uninstallation_result.changed|bool"
  33. - name: Ensure Matrix coturn paths don't exist
  34. file:
  35. path: "{{ matrix_coturn_base_path }}"
  36. state: absent
  37. # Intentionally not removing the Docker image when uninstalling.
  38. # We can't be sure it had been pulled by us in the first place.