|
|
@ -11,6 +11,7 @@ |
|
|
|
environment: |
|
|
|
ETCDCTL_CERT_FILE: "{{ etcd_cert_dir }}/admin-{{ inventory_hostname }}.pem" |
|
|
|
ETCDCTL_KEY_FILE: "{{ etcd_cert_dir }}/admin-{{ inventory_hostname }}-key.pem" |
|
|
|
ETCDCTL_CA_FILE: "{{ etcd_cert_dir }}/ca.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'" |
|
|
@ -24,6 +25,7 @@ |
|
|
|
environment: |
|
|
|
ETCDCTL_CERT_FILE: "{{ etcd_cert_dir }}/admin-{{ inventory_hostname }}.pem" |
|
|
|
ETCDCTL_KEY_FILE: "{{ etcd_cert_dir }}/admin-{{ inventory_hostname }}-key.pem" |
|
|
|
ETCDCTL_CA_FILE: "{{ etcd_cert_dir }}/ca.pem" |
|
|
|
|
|
|
|
- include_tasks: refresh_config.yml |
|
|
|
when: is_etcd_master |
|
|
@ -75,6 +77,7 @@ |
|
|
|
environment: |
|
|
|
ETCDCTL_CERT_FILE: "{{ etcd_cert_dir }}/admin-{{ inventory_hostname }}.pem" |
|
|
|
ETCDCTL_KEY_FILE: "{{ etcd_cert_dir }}/admin-{{ inventory_hostname }}-key.pem" |
|
|
|
ETCDCTL_CA_FILE: "{{ etcd_cert_dir }}/ca.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'" |
|
|
@ -91,6 +94,7 @@ |
|
|
|
environment: |
|
|
|
ETCDCTL_CERT_FILE: "{{ etcd_cert_dir }}/admin-{{ inventory_hostname }}.pem" |
|
|
|
ETCDCTL_KEY_FILE: "{{ etcd_cert_dir }}/admin-{{ inventory_hostname }}-key.pem" |
|
|
|
ETCDCTL_CA_FILE: "{{ etcd_cert_dir }}/ca.pem" |
|
|
|
|
|
|
|
- name: Configure | Check if member is in etcd cluster |
|
|
|
shell: "{{ bin_dir }}/etcdctl --no-sync --endpoints={{ etcd_access_addresses }} member list | grep -q {{ etcd_access_address }}" |
|
|
@ -104,6 +108,7 @@ |
|
|
|
environment: |
|
|
|
ETCDCTL_CERT_FILE: "{{ etcd_cert_dir }}/admin-{{ inventory_hostname }}.pem" |
|
|
|
ETCDCTL_KEY_FILE: "{{ etcd_cert_dir }}/admin-{{ inventory_hostname }}-key.pem" |
|
|
|
ETCDCTL_CA_FILE: "{{ etcd_cert_dir }}/ca.pem" |
|
|
|
|
|
|
|
- name: Configure | Check if member is in etcd-events cluster |
|
|
|
shell: "{{ bin_dir }}/etcdctl --no-sync --endpoints={{ etcd_events_access_addresses }} member list | grep -q {{ etcd_access_address }}" |
|
|
@ -117,6 +122,7 @@ |
|
|
|
environment: |
|
|
|
ETCDCTL_CERT_FILE: "{{ etcd_cert_dir }}/admin-{{ inventory_hostname }}.pem" |
|
|
|
ETCDCTL_KEY_FILE: "{{ etcd_cert_dir }}/admin-{{ inventory_hostname }}-key.pem" |
|
|
|
ETCDCTL_CA_FILE: "{{ etcd_cert_dir }}/ca.pem" |
|
|
|
|
|
|
|
- name: Configure | Join member(s) to etcd cluster one at a time |
|
|
|
include_tasks: join_etcd_member.yml |
|
|
|