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

  1. ---
  2. - name: Configure | Check if etcd cluster is healthy
  3. shell: "{{ bin_dir }}/etcdctl --endpoints={{ etcd_access_addresses }} cluster-health | grep -q 'cluster is healthy'"
  4. register: etcd_cluster_is_healthy
  5. ignore_errors: true
  6. changed_when: false
  7. check_mode: no
  8. when: is_etcd_master
  9. tags:
  10. - facts
  11. environment:
  12. ETCDCTL_CERT_FILE: "{{ etcd_cert_dir }}/admin-{{ inventory_hostname }}.pem"
  13. ETCDCTL_KEY_FILE: "{{ etcd_cert_dir }}/admin-{{ inventory_hostname }}-key.pem"
  14. - name: Configure | Check if etcd-events cluster is healthy
  15. shell: "{{ bin_dir }}/etcdctl --endpoints={{ etcd_events_access_addresses }} cluster-health | grep -q 'cluster is healthy'"
  16. register: etcd_events_cluster_is_healthy
  17. ignore_errors: true
  18. changed_when: false
  19. check_mode: no
  20. when: is_etcd_master and etcd_events_cluster_setup
  21. tags:
  22. - facts
  23. environment:
  24. ETCDCTL_CERT_FILE: "{{ etcd_cert_dir }}/admin-{{ inventory_hostname }}.pem"
  25. ETCDCTL_KEY_FILE: "{{ etcd_cert_dir }}/admin-{{ inventory_hostname }}-key.pem"