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.
 
 

35 wiersze
1.7 KiB

  1. ---
  2. - name: Check existence of matrix-prometheus-nginxlog-exporter service
  3. ansible.builtin.stat:
  4. path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-prometheus-nginxlog-exporter.service"
  5. register: matrix_prometheus_nginxlog_exporter_service_stat
  6. - when: matrix_prometheus_nginxlog_exporter_service_stat.stat.exists | bool
  7. block:
  8. - name: Fail when not cleaning up nginx and prometheus configs
  9. ansible.builtin.fail:
  10. msg: >
  11. This role has added to configs in 'matrix-nginx-proxy', 'matrix-synapse-reverse-proxy-companion' and 'matrix-prometheus'.
  12. Running 'setup-synapse-reverse-proxy-companion' WILL NOT remove those settings from those roles.
  13. Run the playbook again with the `setup-all` tag or all three 'setup-nginx-proxy,setup-synapse-reverse-proxy-companion,setup-prometheus' tags while
  14. 'prometheus_enabled: false' to rebuild their configs.
  15. when: not ('setup-all' in ansible_run_tags or ('setup-nginx-proxy' in ansible_run_tags and 'setup-synapse-reverse-proxy-companion' in ansible_run_tags and 'setup-prometheus' in ansible_run_tags))
  16. - name: Ensure matrix-prometheus-nginxlog-exporter is stopped
  17. ansible.builtin.service:
  18. name: matrix-prometheus-nginxlog-exporter
  19. state: stopped
  20. enabled: false
  21. daemon_reload: true
  22. - name: Ensure matrix-prometheus-nginxlog-exporter.service doesn't exist
  23. ansible.builtin.file:
  24. path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-prometheus-nginxlog-exporter.service"
  25. state: absent
  26. - name: Ensure matrix-prometheus-nginxlog-exporter path doesn't exist
  27. ansible.builtin.file:
  28. path: "{{ matrix_prometheus_nginxlog_exporter_base_path }}"
  29. state: absent