Skip to content

Commit 189e9f2

Browse files
author
Emre Dogan
committed
retry curl
1 parent 2bc9965 commit 189e9f2

File tree

1 file changed

+3
-0
lines changed
  • user-skel/ansible_collections/ace_box/ace_box/roles/health-check/tasks

1 file changed

+3
-0
lines changed

user-skel/ansible_collections/ace_box/ace_box/roles/health-check/tasks/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
- name: Check application availability with curl
2626
command: "curl -o /dev/null -s -w \"%{http_code}\" {{ app_url }}"
2727
register: curl_response
28+
until: curl_response.rc == 0 and curl_response.stdout | int in range(200, 400)
29+
retries: 5
30+
delay: 10
2831
failed_when: curl_response.rc != 0
2932

3033
# - name: Debug the curl response

0 commit comments

Comments
 (0)