check_cluster_health.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536
  1. ---
  2. # glusterfs_check_containerized is a custom module defined at
  3. # lib_utils/library/glusterfs_check_containerized.py
  4. - name: Check for cluster health of glusterfs
  5. glusterfs_check_containerized:
  6. oc_bin: "{{ first_master_client_binary }}"
  7. oc_conf: "{{ openshift.common.config_base }}/master/admin.kubeconfig"
  8. oc_namespace: "{{ openshift_storage_glusterfs_namespace }}"
  9. cluster_name: "{{ openshift_storage_glusterfs_name }}"
  10. exclude_node: "{{ openshift.common.hostname }}"
  11. delegate_to: "{{ groups.oo_first_master.0 }}"
  12. retries: "{{ openshift_glusterfs_cluster_health_check_retries | int}}"
  13. delay: 10
  14. register: glusterfs_check_containerized_res
  15. until: glusterfs_check_containerized_res is succeeded
  16. when:
  17. - openshift_storage_glusterfs_is_native | bool
  18. - "'glusterfs' in groups"
  19. - "groups['glusterfs'] | length > 0"
  20. - name: Check for cluster health of glusterfs (registry)
  21. glusterfs_check_containerized:
  22. oc_bin: "{{ first_master_client_binary }}"
  23. oc_conf: "{{ openshift.common.config_base }}/master/admin.kubeconfig"
  24. oc_namespace: "{{ openshift_storage_glusterfs_registry_namespace }}"
  25. cluster_name: "{{ openshift_storage_glusterfs_registry_name }}"
  26. exclude_node: "{{ openshift.common.hostname }}"
  27. delegate_to: "{{ groups.oo_first_master.0 }}"
  28. retries: "{{ openshift_glusterfs_cluster_health_check_retries | int}}"
  29. delay: 10
  30. register: glusterfs_check_containerized_reg_res
  31. until: glusterfs_check_containerized_reg_res is succeeded
  32. when:
  33. - openshift_storage_glusterfs_registry_is_native | bool
  34. - "'glusterfs_registry' in groups"
  35. - "groups['glusterfs_registry'] | length > 0"