|
|
|
@ -1,6 +1,8 @@
|
|
|
|
|
---
|
|
|
|
|
- name: Configure | Check if etcd cluster is healthy # noqa 306
|
|
|
|
|
shell: "{{ bin_dir }}/etcdctl endpoint --cluster status && {{ bin_dir }}/etcdctl endpoint --cluster health 2>&1 | grep -q -v 'Error: unhealthy cluster'"
|
|
|
|
|
- name: Configure | Check if etcd cluster is healthy
|
|
|
|
|
shell: "set -o pipefail && {{ bin_dir }}/etcdctl endpoint --cluster status && {{ bin_dir }}/etcdctl endpoint --cluster health 2>&1 | grep -q -v 'Error: unhealthy cluster'"
|
|
|
|
|
args:
|
|
|
|
|
executable: /bin/bash
|
|
|
|
|
register: etcd_cluster_is_healthy
|
|
|
|
|
failed_when: false
|
|
|
|
|
changed_when: false
|
|
|
|
@ -16,8 +18,10 @@
|
|
|
|
|
ETCDCTL_CACERT: "{{ etcd_cert_dir }}/ca.pem"
|
|
|
|
|
ETCDCTL_ENDPOINTS: "{{ etcd_access_addresses }}"
|
|
|
|
|
|
|
|
|
|
- name: Configure | Check if etcd-events cluster is healthy # noqa 306
|
|
|
|
|
shell: "{{ bin_dir }}/etcdctl endpoint --cluster status && {{ bin_dir }}/etcdctl endpoint --cluster health 2>&1 | grep -q -v 'Error: unhealthy cluster'"
|
|
|
|
|
- name: Configure | Check if etcd-events cluster is healthy
|
|
|
|
|
shell: "set -o pipefail && {{ bin_dir }}/etcdctl endpoint --cluster status && {{ bin_dir }}/etcdctl endpoint --cluster health 2>&1 | grep -q -v 'Error: unhealthy cluster'"
|
|
|
|
|
args:
|
|
|
|
|
executable: /bin/bash
|
|
|
|
|
register: etcd_events_cluster_is_healthy
|
|
|
|
|
failed_when: false
|
|
|
|
|
changed_when: false
|
|
|
|
@ -73,8 +77,10 @@
|
|
|
|
|
ignore_errors: "{{ etcd_events_cluster_is_healthy.rc == 0 }}"
|
|
|
|
|
when: is_etcd_master and etcd_events_cluster_setup
|
|
|
|
|
|
|
|
|
|
- name: Configure | Wait for etcd cluster to be healthy # noqa 306
|
|
|
|
|
shell: "{{ bin_dir }}/etcdctl endpoint --cluster status && {{ bin_dir }}/etcdctl endpoint --cluster health 2>&1 | grep -q -v 'Error: unhealthy cluster'"
|
|
|
|
|
- name: Configure | Wait for etcd cluster to be healthy
|
|
|
|
|
shell: "set -o pipefail && {{ bin_dir }}/etcdctl endpoint --cluster status && {{ bin_dir }}/etcdctl endpoint --cluster health 2>&1 | grep -q -v 'Error: unhealthy cluster'"
|
|
|
|
|
args:
|
|
|
|
|
executable: /bin/bash
|
|
|
|
|
register: etcd_cluster_is_healthy
|
|
|
|
|
until: etcd_cluster_is_healthy.rc == 0
|
|
|
|
|
retries: "{{ etcd_retries }}"
|
|
|
|
@ -94,8 +100,10 @@
|
|
|
|
|
ETCDCTL_CACERT: "{{ etcd_cert_dir }}/ca.pem"
|
|
|
|
|
ETCDCTL_ENDPOINTS: "{{ etcd_access_addresses }}"
|
|
|
|
|
|
|
|
|
|
- name: Configure | Wait for etcd-events cluster to be healthy # noqa 306
|
|
|
|
|
shell: "{{ bin_dir }}/etcdctl endpoint --cluster status && {{ bin_dir }}/etcdctl endpoint --cluster health 2>&1 | grep -q -v 'Error: unhealthy cluster'"
|
|
|
|
|
- name: Configure | Wait for etcd-events cluster to be healthy
|
|
|
|
|
shell: "set -o pipefail && {{ bin_dir }}/etcdctl endpoint --cluster status && {{ bin_dir }}/etcdctl endpoint --cluster health 2>&1 | grep -q -v 'Error: unhealthy cluster'"
|
|
|
|
|
args:
|
|
|
|
|
executable: /bin/bash
|
|
|
|
|
register: etcd_events_cluster_is_healthy
|
|
|
|
|
until: etcd_events_cluster_is_healthy.rc == 0
|
|
|
|
|
retries: "{{ etcd_retries }}"
|
|
|
|
|