main.yaml 766 B

123456789101112131415161718192021
  1. ---
  2. - name: restart master api
  3. systemd: name={{ openshift.common.service_type }}-master-api state=restarted
  4. when: >
  5. (openshift_master_ha | bool) and
  6. (not master_api_service_status_changed | default(false)) and
  7. openshift.master.cluster_method == 'native'
  8. # TODO: need to fix up ignore_errors here
  9. # We retry the controllers because the API may not be 100% initialized yet.
  10. - name: restart master controllers
  11. command: "systemctl restart {{ openshift.common.service_type }}-master-controllers"
  12. retries: 3
  13. delay: 5
  14. register: result
  15. until: result.rc == 0
  16. when: >
  17. (openshift_master_ha | bool) and
  18. (not master_controllers_service_status_changed | default(false)) and
  19. openshift.master.cluster_method == 'native'
  20. ignore_errors: yes