From 64e76036b2bb0e6b231312ed6b51432ff566a2b9 Mon Sep 17 00:00:00 2001 From: Pieter Date: Wed, 14 Jan 2026 09:03:13 +0100 Subject: [PATCH] Fix bash loop syntax in API readiness check Change from brace expansion to while loop for better portability. --- ansible/roles/authentik/tasks/flows.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ansible/roles/authentik/tasks/flows.yml b/ansible/roles/authentik/tasks/flows.yml index 3c7f7de..cc92335 100644 --- a/ansible/roles/authentik/tasks/flows.yml +++ b/ansible/roles/authentik/tasks/flows.yml @@ -7,13 +7,15 @@ - name: Wait for Authentik API to be ready shell: | - for i in {1..30}; do + i=1 + while [ $i -le 30 ]; do if docker exec authentik-server curl -sf -H "Authorization: Bearer {{ authentik_api_token }}" http://localhost:9000/api/v3/core/tenants/ > /dev/null 2>&1; then echo "Authentik API is ready" exit 0 fi echo "Waiting for Authentik API... attempt $i/30" sleep 5 + i=$((i+1)) done exit 1 register: api_wait