kubespray/roles/etcd/tasks/set_cluster_health.yml

8 lines
256 B
YAML

---
- name: Configure | Check if cluster is healthy
shell: "etcdctl --peers={{ etcd_access_addresses }} cluster-health | grep -q 'cluster is healthy'"
register: etcd_cluster_is_healthy
ignore_errors: true
changed_when: false
when: is_etcd_master