Skip to content

Commit

Permalink
add retries to account for restart/delays
Browse files Browse the repository at this point in the history
  • Loading branch information
mkangia committed Jan 2, 2025
1 parent 5bda3c4 commit 6258bdc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/commcare_cloud/ansible/roles/couchdb2/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@
status_code: 201, 409 # 409 means already set up (conflict)
body: '{}'
when: inventory_hostname == groups.couchdb2.0 and item != groups.couchdb2.0
register: result
until: not result.failed or 'Connection refused' not in result.msg
retries: 5
delay: 10
with_items: "{{ groups.couchdb2 }}"
tags:
- add_couch_nodes
Expand Down

0 comments on commit 6258bdc

Please sign in to comment.