matrix-docker-ansible-deploy/roles/matrix-riot-web/tasks/self_check_riot_web.yml

23 lines
846 B
YAML
Raw Normal View History

2018-10-21 09:58:25 +00:00
---
- set_fact:
2019-02-28 09:51:09 +00:00
riot_web_url_endpoint_public: "https://{{ matrix_server_fqn_riot }}/config.json"
2018-10-21 09:58:25 +00:00
- name: Check riot-web
uri:
url: "{{ riot_web_url_endpoint_public }}"
follow_redirects: none
validate_certs: "{{ matrix_riot_web_self_check_validate_certificates }}"
2018-10-21 09:58:25 +00:00
register: result_riot_web
2020-07-04 11:33:33 +00:00
check_mode: no
2018-10-21 09:58:25 +00:00
ignore_errors: true
- name: Fail if riot-web not working
fail:
2019-02-28 09:51:09 +00:00
msg: "Failed checking riot-web is up at `{{ matrix_server_fqn_riot }}` (checked endpoint: `{{ riot_web_url_endpoint_public }}`). Is Riot running? Is port 443 open in your firewall? Full error: {{ result_riot_web }}"
2018-10-21 09:58:25 +00:00
when: "result_riot_web.failed or 'json' not in result_riot_web"
- name: Report working riot-web
debug:
2019-02-28 09:51:09 +00:00
msg: "riot-web at `{{ matrix_server_fqn_riot }}` is working (checked endpoint: `{{ riot_web_url_endpoint_public }}`)"