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.
 
 

31 lines
1.1 KiB

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