restart_services.yml 1001 B

12345678910111213141516171819202122232425262728
  1. ---
  2. - name: Restart master
  3. service:
  4. name: "{{ openshift.common.service_type }}-master"
  5. state: restarted
  6. when: not openshift_master_ha | bool
  7. - name: Restart master API
  8. service:
  9. name: "{{ openshift.common.service_type }}-master-api"
  10. state: restarted
  11. when: openshift_master_ha | bool and openshift.master.cluster_method != 'pacemaker'
  12. - name: Wait for master API to come back online
  13. become: no
  14. local_action:
  15. module: wait_for
  16. host="{{ openshift.common.hostname }}"
  17. state=started
  18. delay=10
  19. port="{{ openshift.master.api_port }}"
  20. when: openshift_master_ha | bool and openshift.master.cluster_method != 'pacemaker'
  21. - name: Restart master controllers
  22. service:
  23. name: "{{ openshift.common.service_type }}-master-controllers"
  24. state: restarted
  25. # Ignore errrors since it is possible that type != simple for
  26. # pre-3.1.1 installations.
  27. ignore_errors: true
  28. when: openshift_master_ha | bool and openshift.master.cluster_method != 'pacemaker'