File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
roles/elasticsearch/tasks Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 3838
3939- name : Confirm the node joins the cluster
4040 ansible.builtin.uri :
41- url : " {{ elasticsearch_http_protocol }}://{{ elasticsearch_api_host }}:{{ elasticstack_elasticsearch_http_port }}// _cat/nodes?h=name&format=json"
41+ url : " {{ elasticsearch_http_protocol }}://{{ elasticsearch_api_host }}:{{ elasticstack_elasticsearch_http_port }}/_cat/nodes?h=name&format=json"
4242 method : GET
4343 user : elastic
4444 password : " {{ elasticstack_password.stdout }}"
4545 validate_certs : no
4646 register : response
47- until : response.json | json_query("[?name=='{{ elasticsearch_nodename }}']") | length > 0
47+ until : node_found | bool
4848 retries : 200
4949 delay : 3
5050 changed_when : false
51+ vars :
52+ node_found : " {{ response.json | json_query(node_query) | length > 0 }}"
53+ node_query : " [?name=='{{ elasticsearch_nodename }}']"
5154
5255- name : Enable shard allocation for the cluster
5356 ansible.builtin.uri :
You can’t perform that action at this time.
0 commit comments