Skip to content

Commit

Permalink
Merge pull request #6456 from dimagi/mk/4038-deploy-stack-improvements
Browse files Browse the repository at this point in the history
Deploy stack improvements
  • Loading branch information
mkangia authored Jan 6, 2025
2 parents 20e20d5 + 6258bdc commit d6adf3b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/commcare_cloud/ansible/roles/couchdb2/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
- meta: flush_handlers

- name: Add nodes
no_log: true
uri:
url: "http{% if couchdb_secure %}s{% endif %}://{{ inventory_hostname|ipaddr }}:{% if couchdb_version is version('3.0.0', '>=') %}{{ couchdb_port }}/_node/_local{% else %}{{ couchdb_node_port }}{% endif %}/_nodes/couchdb@{{ item|ipaddr }}"
method: PUT
Expand All @@ -91,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 d6adf3b

Please sign in to comment.