Matrix Docker Ansible eploy
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

31 řádky
1.3 KiB

  1. # SPDX-FileCopyrightText: 2018 - 2022 Slavi Pantaleev
  2. # SPDX-FileCopyrightText: 2019 - 2020 Dan Arnfield
  3. # SPDX-FileCopyrightText: 2020 MDAD project contributors
  4. # SPDX-FileCopyrightText: 2022 Marko Weltzer
  5. #
  6. # SPDX-License-Identifier: AGPL-3.0-or-later
  7. ---
  8. - name: Check Matrix Client API
  9. ansible.builtin.uri:
  10. url: "{{ matrix_synapse_client_api_url_endpoint_public }}"
  11. follow_redirects: none
  12. validate_certs: "{{ matrix_synapse_self_check_validate_certificates }}"
  13. register: result_matrix_synapse_client_api
  14. ignore_errors: true
  15. check_mode: false
  16. when: matrix_synapse_enabled | bool
  17. delegate_to: 127.0.0.1
  18. become: false
  19. - name: Fail if Matrix Client API not working
  20. ansible.builtin.fail:
  21. msg: "Failed checking Matrix Client API is up at `{{ matrix_server_fqn_matrix }}` (checked endpoint: `{{ matrix_synapse_client_api_url_endpoint_public }}`). Is Synapse running? Is port 443 open in your firewall? Full error: {{ result_matrix_synapse_client_api }}"
  22. when: "matrix_synapse_enabled | bool and (result_matrix_synapse_client_api.failed or 'json' not in result_matrix_synapse_client_api)"
  23. - name: Report working Matrix Client API
  24. ansible.builtin.debug:
  25. msg: "The Matrix Client API at `{{ matrix_server_fqn_matrix }}` (checked endpoint: `{{ matrix_synapse_client_api_url_endpoint_public }}`) is working"
  26. when: matrix_synapse_enabled | bool