ansible/ansible — pull request #937 by jhoekx (2012-08-24 17:15:23+00:00)
Title: Add a state parameter to the wait_for module.

This takes started, stopped and restarted.

Started returns when connecting is possible.
Stopped when connecting is not possible.
Restarted first waits for connecting to be impossible and returns when it is
possible again.

You can now do things like:

```
- name: Reboot ${inventory_hostname}
action: command /sbin/reboot

- name: Wait for ${inventory_hostname}
action: wait_for name=${inventory_hostname} state=restarted
delegate_to: firefly
```

Sorry for this not being in the first request, but once you have something, you start to see additional things that are possible.