From c4f78b015d1c198280409f0c9ee9f1c458f57ad1 Mon Sep 17 00:00:00 2001 From: Jan Beilicke Date: Wed, 1 Apr 2020 21:31:21 +0200 Subject: [PATCH] Improved and simplified healthcheck. Use with `--tags health` to run. --- tasks/main.yml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index d58e72a..5abe017 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -52,23 +52,12 @@ that: - "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" become: false uri: url: https://{{ onlyoffice_document_server_virtual_host }} - return_content: yes - timeout: 600 + timeout: 300 validate_certs: no register: url_check delegate_to: localhost - -# - fail: -# msg: 'Service is not available!' -# when: "'OK' not in url_check.content" + tags: health