The following req. /bin/ping -- don't forget to limit the ping count.
$ cat ping-list.yml
# Simple ad hoc gateway ping. Prefer proper monitoring.
---
- hosts: all:my_special_remote_host:!not_the_broken_one
tasks:
- name: check gateways after deployment
command: /bin/ping -c3 {{ item }}
with_items:
- 192.168.1.1
-
gateway1.example.org
There are more elaborate solutions
In my reading list, not tested (autopinger):
http://jedelman.com/home/network-test-automation-with-ansible/
/Benjamin
--
FSU Jena | JULIELab.de/Staff/Benjamin+Redling.html
vox: +49 3641 9 44323 | fax: +49 3641 9 44321