Check node_ip is defined when removing etcd node (#6603)
This commit is contained in:
parent
e0b1787740
commit
2faf53b039
1 changed files with 5 additions and 0 deletions
|
@ -17,6 +17,11 @@
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups['etcd']
|
- 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
|
- name: Lookup etcd member id
|
||||||
shell: "{{ bin_dir }}/etcdctl member list | grep {{ node_ip }} | cut -d, -f1"
|
shell: "{{ bin_dir }}/etcdctl member list | grep {{ node_ip }} | cut -d, -f1"
|
||||||
register: etcd_member_id
|
register: etcd_member_id
|
||||||
|
|
Loading…
Reference in a new issue