Matrix Docker Ansible eploy
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

48 wiersze
1.4 KiB

  1. ---
  2. - name: Check existence of matrix-coturn service
  3. ansible.builtin.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. ansible.builtin.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. ansible.builtin.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. ansible.builtin.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. ansible.builtin.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. ansible.builtin.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.