From 82cc24a7f54b56867cfa4351bc2806eca4745593 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Tue, 19 Aug 2025 17:48:02 +0200 Subject: [PATCH] Added reset condition for openresty --- roles/svc-prx-openresty/handlers/main.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/roles/svc-prx-openresty/handlers/main.yml b/roles/svc-prx-openresty/handlers/main.yml index 05410ccc..29da8c09 100644 --- a/roles/svc-prx-openresty/handlers/main.yml +++ b/roles/svc-prx-openresty/handlers/main.yml @@ -1,4 +1,13 @@ --- +- name: Wait until OpenResty container is running + command: docker inspect -f '{{.State.Running}}' {{ OPENRESTY_CONTAINER }} + register: openresty_status + retries: 10 + delay: 3 + until: openresty_status.stdout.strip() == "true" + changed_when: false + listen: restart openresty + - name: Validate OpenResty configuration command: > docker exec {{ OPENRESTY_CONTAINER }} openresty -t -q