---
- name: Restart master API
  service:
    name: "{{ openshift_service_type }}-master-api"
    state: restarted
- name: Wait for master API to come back online
  wait_for:
    host: "{{ openshift.common.hostname }}"
    state: started
    delay: 10
    port: "{{ openshift.master.api_port }}"
    timeout: 600
# We retry the controllers because the API may not be 100% initialized yet.
- name: restart master controllers
  command: "systemctl restart {{ openshift_service_type }}-master-controllers"
  retries: 5
  delay: 5
  register: result
  until: result.rc == 0
