I\'m trying to restart the server and then wait, using this:
- name: Restart server shell: reboot - name: Wait for server to restart wait_for: port=
You should change the wait_for task to run as local_action, and specify the host you're waiting for. For example:
- name: Wait for server to restart local_action: module: wait_for host=192.168.50.4 port=22 delay=1 timeout=300