No results
1
checks
Luca Matteo Spoljarevic edited this page 2026-02-27 21:40:24 +01:00
Table of Contents
checks
Playbooks to test connectivity and gather a short status report for all hosts in your inventory.
Playbooks
ping.yml
Runs the Ansible ping module on all hosts to verify SSH (or other connection) and Python availability. No facts are gathered.
Use case: Quick check that every host in the inventory is reachable.
Run:
ansible-playbook -i inventory.ini checks/ping.yml
status.yml
Gathers a system status summary for all hosts:
- Hostname and IPv4 addresses
- Uptime
- Package manager (apt, dnf/yum, or pacman)
- Pending updates (list of upgradable packages, or “Keine Updates verfügbar” if none)
Uses gather_facts: yes and become: yes so it can run package-manager checks.
Run:
ansible-playbook -i inventory.ini checks/status.yml -K
Requirements
- A working inventory (e.g.
inventory.ini) with hosts you can reach. - SSH (or configured connection) and Python on each host for the ping module.
- Sufficient privileges for status.yml (sudo) to run
uptimeand package-manager commands.