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.
 
 

29 lines
1.2 KiB

  1. # SPDX-FileCopyrightText: 2024 MDAD Team and contributors
  2. #
  3. # SPDX-License-Identifier: AGPL-3.0-or-later
  4. ---
  5. - ansible.builtin.set_fact:
  6. matrix_client_cinny_url_endpoint_public: "{{ matrix_client_cinny_scheme }}://{{ matrix_client_cinny_hostname }}{{ matrix_client_cinny_path_prefix }}/config.json"
  7. - name: Check Cinny
  8. ansible.builtin.uri:
  9. url: "{{ matrix_client_cinny_url_endpoint_public }}"
  10. follow_redirects: none
  11. validate_certs: "{{ matrix_client_cinny_self_check_validate_certificates }}"
  12. register: matrix_client_cinny_self_check_result
  13. check_mode: false
  14. ignore_errors: true
  15. delegate_to: 127.0.0.1
  16. become: false
  17. - name: Fail if Cinny not working
  18. ansible.builtin.fail:
  19. msg: "Failed checking Cinny is up at `{{ matrix_client_cinny_hostname }}` (checked endpoint: `{{ matrix_client_cinny_url_endpoint_public }}`). Is Cinny running? Is port 443 open in your firewall? Full error: {{ matrix_client_cinny_self_check_result }}"
  20. when: "matrix_client_cinny_self_check_result.failed or 'json' not in matrix_client_cinny_self_check_result"
  21. - name: Report working Cinny
  22. ansible.builtin.debug:
  23. msg: "Cinny at `{{ matrix_client_cinny_hostname }}` is working (checked endpoint: `{{ matrix_client_cinny_url_endpoint_public }}`)"