From 2faf53b0395c85c5954d6210b1a60348408c66e0 Mon Sep 17 00:00:00 2001 From: Florian Ruynat <16313165+floryut@users.noreply.github.com> Date: Tue, 1 Sep 2020 10:05:58 +0200 Subject: [PATCH] Check node_ip is defined when removing etcd node (#6603) --- roles/remove-node/remove-etcd-node/tasks/main.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/remove-node/remove-etcd-node/tasks/main.yml b/roles/remove-node/remove-etcd-node/tasks/main.yml index 0fc0f7fb4..3351e2038 100644 --- a/roles/remove-node/remove-etcd-node/tasks/main.yml +++ b/roles/remove-node/remove-etcd-node/tasks/main.yml @@ -17,6 +17,11 @@ when: - inventory_hostname in groups['etcd'] +- name: Make sure node_ip is set + assert: + that: node_ip is defined and node_ip | length > 0 + msg: "Etcd node ip is not set !" + - name: Lookup etcd member id shell: "{{ bin_dir }}/etcdctl member list | grep {{ node_ip }} | cut -d, -f1" register: etcd_member_id