Ping role
Simple Ansible ping role to verify connectivity and basic functionality of remote hosts.
Usage
Include the role in your playbook:
1 2 3 4 | |
The role provides this tag:
- ping - Execute ping test
Docs
Test connectivity to all hosts:
1 | |
Test specific host group:
1 | |
What It Does
The role executes Ansible's built-in ping module, which:
1. Connects to the remote host via SSH
2. Verifies Python interpreter availability
3. Returns pong on success
Output
Successful ping:
1 2 3 | |
Failed ping:
1 2 | |
Use Cases
Use this role to: - Verify Connectivity: Test SSH access to hosts before deployment - Check Inventory: Validate inventory configuration is correct - Python Check: Ensure Python is installed on target hosts - Pre-flight Tests: Quick sanity check before running complex playbooks - Troubleshooting: Diagnose connection issues
Requirements
Remote hosts must have: - SSH access configured - Python installed (2.7+ or 3.5+) - User with sudo privileges (if needed for other tasks)
Integration
Often used at the start of playbooks:
1 2 3 4 5 6 7 8 9 10 | |
Dedicated Playbook
A dedicated ping playbook exists at playbooks/proxmox/ping.yml for quick connectivity tests across all infrastructure.
Not a Network Ping
Note: This is not an ICMP ping. It uses Ansible's Python-based connectivity test via SSH. For actual ICMP ping, use shell commands:
1 2 3 | |
