How to wait for server restart using Ansible?

Question:

I’m trying to restart the server and then wait, using this:

But I get this error:

Answer:

You should change the wait_for task to run as local_action, and specify the host you’re waiting for. For example:

Leave a Reply