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

26 строки
1.0 KiB

  1. ---
  2. # Query an arbitrary ntfy topic using ntfy's UnifiedPush topic name syntax.
  3. # Expect an empty response (because we query 'since=1s').
  4. - ansible.builtin.set_fact:
  5. matrix_ntfy_url_endpoint_public: "{{ matrix_ntfy_base_url }}/upSELFCHECK123/json?poll=1&since=1s"
  6. - name: Check ntfy
  7. ansible.builtin.uri:
  8. url: "{{ matrix_ntfy_url_endpoint_public }}"
  9. follow_redirects: none
  10. validate_certs: "{{ matrix_ntfy_self_check_validate_certificates }}"
  11. register: matrix_ntfy_self_check_result
  12. check_mode: false
  13. ignore_errors: true
  14. - name: Fail if ntfy not working
  15. ansible.builtin.fail:
  16. msg: "Failed checking ntfy is up at `{{ matrix_server_fqn_ntfy }}` (checked endpoint: `{{ matrix_ntfy_url_endpoint_public }}`). Is ntfy running? Is port 443 open in your firewall? Full error: {{ matrix_ntfy_self_check_result }}"
  17. when: "matrix_ntfy_self_check_result.failed"
  18. - name: Report working ntfy
  19. ansible.builtin.debug:
  20. msg: "ntfy at `{{ matrix_server_fqn_ntfy }}` is working (checked endpoint: `{{ matrix_ntfy_url_endpoint_public }}`)"