restart_services.yml 990 B

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