From c06a9ec1341ef1af54e98eb665e8e35bc2bc4dc5 Mon Sep 17 00:00:00 2001 From: Michael Schiemer Date: Sat, 8 Nov 2025 18:53:07 +0100 Subject: [PATCH] fix: Use internal healthcheck instead of HTTP ping endpoint - Change health check to use docker exec traefik healthcheck - HTTP ping endpoint requires BasicAuth (401), internal check is more reliable - Improves health check accuracy in restart-traefik.yml playbook --- deployment/ansible/playbooks/restart-traefik.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/deployment/ansible/playbooks/restart-traefik.yml b/deployment/ansible/playbooks/restart-traefik.yml index 5acb39de..07d97786 100644 --- a/deployment/ansible/playbooks/restart-traefik.yml +++ b/deployment/ansible/playbooks/restart-traefik.yml @@ -56,13 +56,10 @@ changed_when: false failed_when: false - - name: Check Traefik health endpoint - ansible.builtin.uri: - url: "{{ traefik_url }}/ping" - method: GET - status_code: [200] - validate_certs: no - timeout: 10 + - name: Check Traefik health endpoint (ping endpoint requires auth, use internal check) + shell: | + cd {{ traefik_stack_path }} + docker compose exec -T {{ traefik_container_name }} traefik healthcheck --ping 2>&1 || echo "HEALTH_CHECK_FAILED" register: traefik_health ignore_errors: yes changed_when: false