diff --git a/src/commcare_cloud/ansible/roles/couchdb2/tasks/main.yml b/src/commcare_cloud/ansible/roles/couchdb2/tasks/main.yml index fff8aa8662..7f27e4d66a 100644 --- a/src/commcare_cloud/ansible/roles/couchdb2/tasks/main.yml +++ b/src/commcare_cloud/ansible/roles/couchdb2/tasks/main.yml @@ -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