Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

48 строки
1.3 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. enabled: false
  12. daemon_reload: true
  13. when: "matrix_coturn_service_stat.stat.exists|bool"
  14. - name: Ensure matrix-coturn-reload.timer is stopped
  15. service:
  16. name: matrix-coturn
  17. state: stopped
  18. enabled: false
  19. daemon_reload: true
  20. failed_when: false
  21. when: "matrix_coturn_service_stat.stat.exists|bool"
  22. - name: Ensure systemd units don't exist
  23. file:
  24. path: "{{ matrix_systemd_path }}/{{ item }}"
  25. state: absent
  26. register: matrix_coturn_systemd_unit_uninstallation_result
  27. with_items:
  28. - matrix-coturn.service
  29. - matrix-coturn-reload.service
  30. - matrix-coturn-reload.timer
  31. - name: Ensure systemd reloaded after unit removal
  32. service:
  33. daemon_reload: true
  34. when: "matrix_coturn_systemd_unit_uninstallation_result.changed|bool"
  35. - name: Ensure Matrix coturn paths don't exist
  36. file:
  37. path: "{{ matrix_coturn_base_path }}"
  38. state: absent
  39. # Intentionally not removing the Docker image when uninstalling.
  40. # We can't be sure it had been pulled by us in the first place.