k8s-sig-cluster-lifecycleawskubesprayhigh-availabilityansiblekubernetes-clustergcekubernetesbare-metal
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
1.0 KiB
26 lines
1.0 KiB
---
|
|
- name: Configure | Check if etcd cluster is healthy
|
|
shell: "{{ bin_dir }}/etcdctl --endpoints={{ etcd_access_addresses }} cluster-health | grep -q 'cluster is healthy'"
|
|
register: etcd_cluster_is_healthy
|
|
ignore_errors: true
|
|
changed_when: false
|
|
check_mode: no
|
|
when: is_etcd_master
|
|
tags:
|
|
- facts
|
|
environment:
|
|
ETCDCTL_CERT_FILE: "{{ etcd_cert_dir }}/admin-{{ inventory_hostname }}.pem"
|
|
ETCDCTL_KEY_FILE: "{{ etcd_cert_dir }}/admin-{{ inventory_hostname }}-key.pem"
|
|
|
|
- name: Configure | Check if etcd-events cluster is healthy
|
|
shell: "{{ bin_dir }}/etcdctl --endpoints={{ etcd_events_access_addresses }} cluster-health | grep -q 'cluster is healthy'"
|
|
register: etcd_events_cluster_is_healthy
|
|
ignore_errors: true
|
|
changed_when: false
|
|
check_mode: no
|
|
when: is_etcd_master and etcd_events_cluster_setup
|
|
tags:
|
|
- facts
|
|
environment:
|
|
ETCDCTL_CERT_FILE: "{{ etcd_cert_dir }}/admin-{{ inventory_hostname }}.pem"
|
|
ETCDCTL_KEY_FILE: "{{ etcd_cert_dir }}/admin-{{ inventory_hostname }}-key.pem"
|