verify_control_plane_running.yml 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. ---
  2. - name: Verify master processes
  3. hosts: oo_masters_to_config
  4. roles:
  5. - openshift_facts
  6. tasks:
  7. - openshift_facts:
  8. role: master
  9. local_facts:
  10. ha: "{{ groups.oo_masters_to_config | length > 1 }}"
  11. - name: Ensure Master is running
  12. service:
  13. name: "{{ openshift.common.service_type }}-master"
  14. state: started
  15. enabled: yes
  16. when: openshift.master.ha is defined and not openshift.master.ha | bool and openshift.common.is_containerized | bool
  17. - name: Ensure HA Master is running
  18. service:
  19. name: "{{ openshift.common.service_type }}-master-api"
  20. state: started
  21. enabled: yes
  22. when: openshift.master.ha is defined and openshift.master.ha | bool and openshift.common.is_containerized | bool
  23. - name: Ensure HA Master is running
  24. service:
  25. name: "{{ openshift.common.service_type }}-master-controllers"
  26. state: started
  27. enabled: yes
  28. when: openshift.master.ha is defined and openshift.master.ha | bool and openshift.common.is_containerized | bool