Make sure node_ip is set if node is in etcd group (#6719)
parent
e1265b2e7b
commit
5989680967
|
@ -21,6 +21,8 @@
|
||||||
assert:
|
assert:
|
||||||
that: node_ip is defined and node_ip | length > 0
|
that: node_ip is defined and node_ip | length > 0
|
||||||
msg: "Etcd node ip is not set !"
|
msg: "Etcd node ip is not set !"
|
||||||
|
when:
|
||||||
|
- inventory_hostname in groups['etcd']
|
||||||
|
|
||||||
- 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"
|
||||||
|
|
Loading…
Reference in New Issue