DevOps / Scripts bash Beginner

Ansible Connectivity Test

Ping your entire Ansible inventory and colour-code the results.

bash
#!/bin/bash
ansible all -m ping -o 2>/dev/null | awk '/SUCCESS/ {print "OK:", $1} !/SUCCESS/ {print "FAIL:", $1}'

Prerequisites

  • ansible
  • inventory file

Pro Tips

  • → Pass -i staging.ini for specific env.

Was this module useful?

Share your experience — it helps the team improve.

Leave Feedback

Commercial Licensing

Acquire a production access token or template license for enterprise deployment.

Module Info

Language
bash
Level
Beginner
Read time
1 min
Published
Mar 2024
License
Commercial License

Newsletter

New modules every week, directly to your inbox.