I have the following playbook snippet
`
I have the following playbook snippet
`
It fails because the server shutdown too fast.
Use
shell: sleep 2 && reboot
instead of your command: and it will work without issues.
one more thing - I’m doing something similar and I’ve found it necessary to use wait_for: to determine that port 22 actually went down before I wait for it to come up again. I’ve also used wait_for_conection: to wait for it to come all the way back before I proceed.