Skip to content

Commit 2245b50

Browse files
authored
Enable shard allocation before checking cluster health
1 parent b1aa795 commit 2245b50

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/roles/elasticsearch/tasks/es_upgrade.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,6 @@
118118
port: "{{ elasticsearch_transport_port }}"
119119
delay: 35
120120

121-
- name: Wait for cluster health to return to yellow or green
122-
uri:
123-
url: "http://localhost:{{ elasticsearch_http_port }}/_cluster/health"
124-
method: GET
125-
register: response
126-
until: "response.json.status == 'yellow' or response.json.status == 'green'"
127-
retries: 5
128-
delay: 30
129-
130121
- name: Enable shard allocation for the cluster
131122
uri:
132123
url: "http://localhost:{{ elasticsearch_http_port }}/_cluster/settings"
@@ -140,6 +131,15 @@
140131
retries: 5
141132
delay: 30
142133

134+
- name: Wait for cluster health to return to yellow or green
135+
uri:
136+
url: "http://localhost:{{ elasticsearch_http_port }}/_cluster/health"
137+
method: GET
138+
register: response
139+
until: "response.json.status == 'yellow' or response.json.status == 'green'"
140+
retries: 5
141+
delay: 30
142+
143143

144144
#
145145
# No re-display Elasticsearch version

0 commit comments

Comments
 (0)