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 38
38
39
39
- name : Confirm the node joins the cluster
40
40
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"
42
42
method : GET
43
43
user : elastic
44
44
password : " {{ elasticstack_password.stdout }}"
45
45
validate_certs : no
46
46
register : response
47
- until : response.json | json_query("[?name=='{{ elasticsearch_nodename }}']") | length > 0
47
+ until : node_found | bool
48
48
retries : 200
49
49
delay : 3
50
50
changed_when : false
51
+ vars :
52
+ node_found : " {{ response.json | json_query(node_query) | length > 0 }}"
53
+ node_query : " [?name=='{{ elasticsearch_nodename }}']"
51
54
52
55
- name : Enable shard allocation for the cluster
53
56
ansible.builtin.uri :
You can’t perform that action at this time.
0 commit comments