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.
 
 

25 lines
1.1 KiB

  1. ---
  2. - ansible.builtin.set_fact:
  3. matrix_client_element_url_endpoint_public: "{{ matrix_client_element_scheme }}://{{ matrix_client_element_hostname }}/config.json"
  4. - name: Check Element Web
  5. ansible.builtin.uri:
  6. url: "{{ matrix_client_element_url_endpoint_public }}"
  7. follow_redirects: none
  8. validate_certs: "{{ matrix_client_element_self_check_validate_certificates }}"
  9. register: matrix_client_element_self_check_result
  10. check_mode: false
  11. ignore_errors: true
  12. delegate_to: 127.0.0.1
  13. become: false
  14. - name: Fail if Element Web not working
  15. ansible.builtin.fail:
  16. 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 }}"
  17. when: "matrix_client_element_self_check_result.failed or 'json' not in matrix_client_element_self_check_result"
  18. - name: Report working Element Web
  19. ansible.builtin.debug:
  20. msg: "Element Web at `{{ matrix_server_fqn_element }}` is working (checked endpoint: `{{ matrix_client_element_url_endpoint_public }}`)"