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

38 строки
1.4 KiB

  1. ---
  2. - name: Check existence of matrix-riot-web.service
  3. ansible.builtin.stat:
  4. path: "{{ matrix_systemd_path }}/matrix-riot-web.service"
  5. register: matrix_client_riot_web_service_stat
  6. when: "matrix_client_element_enabled | bool"
  7. - name: Ensure matrix-riot-web is stopped
  8. ansible.builtin.service:
  9. name: matrix-riot-web
  10. state: stopped
  11. enabled: false
  12. daemon_reload: true
  13. register: stopping_result
  14. when: "matrix_client_element_enabled | bool and matrix_client_riot_web_service_stat.stat.exists"
  15. - name: Ensure matrix-riot-web.service doesn't exist
  16. ansible.builtin.file:
  17. path: "{{ matrix_systemd_path }}/matrix-riot-web.service"
  18. state: absent
  19. when: "matrix_client_element_enabled | bool and matrix_client_riot_web_service_stat.stat.exists"
  20. - name: Ensure systemd reloaded after matrix-riot-web.service removal
  21. ansible.builtin.service:
  22. daemon_reload: true
  23. when: "matrix_client_element_enabled | bool and matrix_client_riot_web_service_stat.stat.exists"
  24. - name: Check existence of /matrix/riot-web
  25. ansible.builtin.stat:
  26. path: "/matrix/riot-web"
  27. register: matrix_client_riot_web_dir_stat
  28. when: "matrix_client_element_enabled | bool"
  29. - name: Relocate /matrix/riot-web to /matrix/client-element
  30. ansible.builtin.command: "mv /matrix/riot-web /matrix/client-element"
  31. when: "matrix_client_element_enabled | bool and matrix_client_riot_web_dir_stat.stat.exists"