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

24 строки
1.1 KiB

  1. ---
  2. - name: Check Matrix Client API
  3. ansible.builtin.uri:
  4. url: "{{ matrix_synapse_client_api_url_endpoint_public }}"
  5. follow_redirects: none
  6. validate_certs: "{{ matrix_synapse_self_check_validate_certificates }}"
  7. register: result_matrix_synapse_client_api
  8. ignore_errors: true
  9. check_mode: false
  10. when: matrix_synapse_enabled | bool
  11. delegate_to: 127.0.0.1
  12. become: false
  13. - name: Fail if Matrix Client API not working
  14. ansible.builtin.fail:
  15. 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 }}"
  16. when: "matrix_synapse_enabled | bool and (result_matrix_synapse_client_api.failed or 'json' not in result_matrix_synapse_client_api)"
  17. - name: Report working Matrix Client API
  18. ansible.builtin.debug:
  19. msg: "The Matrix Client API at `{{ matrix_server_fqn_matrix }}` (checked endpoint: `{{ matrix_synapse_client_api_url_endpoint_public }}`) is working"
  20. when: matrix_synapse_enabled | bool