restart_hosts.yml 471 B

1234567891011121314151617
  1. - name: Restart master system
  2. # https://github.com/ansible/ansible/issues/10616
  3. shell: sleep 2 && shutdown -r now "OpenShift Ansible master rolling restart"
  4. async: 1
  5. poll: 0
  6. ignore_errors: true
  7. become: yes
  8. # Ensure the api_port is available.
  9. - name: Wait for master API to come back online
  10. become: no
  11. local_action:
  12. module: wait_for
  13. host="{{ inventory_hostname }}"
  14. state=started
  15. delay=10
  16. port="{{ openshift.master.api_port }}"