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

38 lines
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"