Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

30 rivejä
1.3 KiB

  1. # SPDX-FileCopyrightText: 2020 - 2024 Slavi Pantaleev
  2. # SPDX-FileCopyrightText: 2022 Marko Weltzer
  3. #
  4. # SPDX-License-Identifier: AGPL-3.0-or-later
  5. ---
  6. - ansible.builtin.set_fact:
  7. matrix_client_element_url_endpoint_public: "{{ matrix_client_element_scheme }}://{{ matrix_client_element_hostname }}/config.json"
  8. - name: Check Element Web
  9. ansible.builtin.uri:
  10. url: "{{ matrix_client_element_url_endpoint_public }}"
  11. follow_redirects: none
  12. validate_certs: "{{ matrix_client_element_self_check_validate_certificates }}"
  13. register: matrix_client_element_self_check_result
  14. check_mode: false
  15. ignore_errors: true
  16. delegate_to: 127.0.0.1
  17. become: false
  18. - name: Fail if Element Web not working
  19. ansible.builtin.fail:
  20. msg: "Failed checking Element Web is up at `{{ matrix_server_fqn_element }}` (checked endpoint: `{{ matrix_client_element_url_endpoint_public }}`). Is Element Web running? Is port 443 open in your firewall? Full error: {{ matrix_client_element_self_check_result }}"
  21. when: "matrix_client_element_self_check_result.failed or 'json' not in matrix_client_element_self_check_result"
  22. - name: Report working Element Web
  23. ansible.builtin.debug:
  24. msg: "Element Web at `{{ matrix_server_fqn_element }}` is working (checked endpoint: `{{ matrix_client_element_url_endpoint_public }}`)"