diff --git a/ansible-scylla-node/tasks/common.yml b/ansible-scylla-node/tasks/common.yml index eac5f969..115f61a5 100644 --- a/ansible-scylla-node/tasks/common.yml +++ b/ansible-scylla-node/tasks/common.yml @@ -318,6 +318,12 @@ set_fact: broadcast_address: "{{ scylla_broadcast_address }}" +# This will be used later to validate the output of nodetool status +- name: Create a list with the broadcast addresses of the nodes in play_hosts + broadcast_address_list: "{{ broadcast_address_list | default([]) + [hostvars[item]['broadcast_address']] }}" + loop: "{{ play_hosts }}" + run_once: true + - name: start_scylla_service dependent tasks block: - name: Generate tokens for the new nodes @@ -347,7 +353,7 @@ - name: wait for the cluster to become healthy shell: | - nodetool status|grep -E '^UN|^UJ|^DN'| grep -Ew "{{ play_hosts | join('|') }}" | wc -l + nodetool status|grep -E '^UN|^UJ|^DN'| grep -Ew "{{ broadcast_address_list | join('|') }}" | wc -l register: node_count until: node_count.stdout|int == play_hosts|length retries: "{{ scylla_bootstrap_wait_time_sec|int }}"