Make sure node_ip is set if node is in etcd group (#6720)

This commit is contained in:
Florent Monbillard 2020-09-23 03:46:08 -04:00 committed by GitHub
parent f9a7dce7ca
commit 9fc14b3e6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,6 +21,8 @@
assert:
that: node_ip is defined and node_ip | length > 0
msg: "Etcd node ip is not set !"
when:
- inventory_hostname in groups['etcd']
- name: Lookup etcd member id
shell: "{{ bin_dir }}/etcdctl member list | grep {{ node_ip }} | cut -d, -f1"