On 2016-02-09 20:04, Portia Wong wrote:
> Currently at my workplace, our hosts have multiple connections to different
> gateways. I am trying to find a way to see whether I can easily ping 4-5
> gateways by either running an ad-hoc command or through a playbook to help
> me verify that after each host deployment, connection to those gateways are
> successful. Has anybody ever done this before?
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
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/56BCBD74.9090806%40uni-jena.de.
For more options, visit https://groups.google.com/d/optout.