Skip to content

Commit b33fb92

Browse files
igorribeiroduartevladzcloudius
authored andcommitted
replace_node.yml: Move the task that gets the host ids
So far we've been using the host ids only to set the replace_node_first_boot, but in the next patches we'll also be using them to set nodes that should be ignored. Having that in mind, let's move this task to outside the block responsible for setting replace_node_first_boot.
1 parent 1b4e98d commit b33fb92

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

example-playbooks/replace_node/replace_node.yml

+11-10
Original file line numberDiff line numberDiff line change
@@ -177,18 +177,19 @@
177177
register: _replace_node_first_boot_grep
178178
ignore_errors: true
179179

180+
- name: Get the host id for all nodes
181+
uri:
182+
url: "http://{{ scylla_api_address }}:{{ scylla_api_port }}/storage_service/host_id"
183+
method: GET
184+
register: _host_ids
185+
until: _host_ids.status == 200
186+
retries: 5
187+
delay: 1
188+
delegate_to: "{{ temporary_seed }}"
189+
run_once: true
190+
180191
- name: Set replace_node_first_boot
181192
block:
182-
- name: Get the host id for all nodes
183-
uri:
184-
url: "http://{{ scylla_api_address }}:{{ scylla_api_port }}/storage_service/host_id"
185-
method: GET
186-
register: _host_ids
187-
until: _host_ids.status == 200
188-
retries: 5
189-
delay: 1
190-
delegate_to: "{{ temporary_seed }}"
191-
192193
- set_fact:
193194
_replaced_node_host_id: "{{ item.value }}"
194195
when: item.key == replaced_node or item.key == replaced_node_broadcast_address

0 commit comments

Comments
 (0)