main.yml 1.1 KB

12345678910111213141516171819202122232425
  1. ---
  2. - name: restart master
  3. service: name={{ openshift.common.service_type }}-master state=restarted
  4. when: (not openshift_master_ha | bool) and (not (master_service_status_changed | default(false) | bool))
  5. notify: Verify API Server
  6. - name: restart master api
  7. service: name={{ openshift.common.service_type }}-master-api state=restarted
  8. when: (openshift_master_ha | bool) and (not (master_api_service_status_changed | default(false) | bool)) and openshift.master.cluster_method == 'native'
  9. notify: Verify API Server
  10. - name: restart master controllers
  11. service: name={{ openshift.common.service_type }}-master-controllers state=restarted
  12. when: (openshift_master_ha | bool) and (not (master_controllers_service_status_changed | default(false) | bool)) and openshift.master.cluster_method == 'native'
  13. - name: Verify API Server
  14. # Using curl here since the uri module requires python-httplib2 and
  15. # wait_for port doesn't provide health information.
  16. command: >
  17. curl -k --silent {{ openshift.master.api_url }}/healthz/ready
  18. register: api_available_output
  19. until: api_available_output.stdout == 'ok'
  20. retries: 120
  21. delay: 1
  22. changed_when: false