Improved and simplified healthcheck. Use with --tags health
to run.
This commit is contained in:
parent
23cf91f21e
commit
c4f78b015d
1 changed files with 2 additions and 13 deletions
|
@ -52,23 +52,12 @@
|
||||||
that:
|
that:
|
||||||
- "output.ansible_facts['onlyoffice-document-server']['onlyoffice-document-server'].state.running"
|
- "output.ansible_facts['onlyoffice-document-server']['onlyoffice-document-server'].state.running"
|
||||||
|
|
||||||
- name: "Wait for service (443/TLS) to become available from the public internet"
|
|
||||||
become: false
|
|
||||||
wait_for:
|
|
||||||
host: "{{ onlyoffice_document_server_virtual_host }}"
|
|
||||||
port: 443
|
|
||||||
delegate_to: localhost
|
|
||||||
|
|
||||||
- name: "Test whether the service is healthy from the public internet"
|
- name: "Test whether the service is healthy from the public internet"
|
||||||
become: false
|
become: false
|
||||||
uri:
|
uri:
|
||||||
url: https://{{ onlyoffice_document_server_virtual_host }}
|
url: https://{{ onlyoffice_document_server_virtual_host }}
|
||||||
return_content: yes
|
timeout: 300
|
||||||
timeout: 600
|
|
||||||
validate_certs: no
|
validate_certs: no
|
||||||
register: url_check
|
register: url_check
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
tags: health
|
||||||
# - fail:
|
|
||||||
# msg: 'Service is not available!'
|
|
||||||
# when: "'OK' not in url_check.content"
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue