restart_services.yml 823 B

123456789101112131415161718192021222324252627
  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
  12. - name: Wait for master API to come back online
  13. wait_for:
  14. host: "{{ openshift.common.hostname }}"
  15. state: started
  16. delay: 10
  17. port: "{{ openshift.master.api_port }}"
  18. timeout: 600
  19. when: openshift_master_ha | bool
  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