Add connectivity test playbook

Tests SSH connectivity and displays basic host info (OS, version).

Usage: ansible-playbook playbooks/ping.yml

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
directlx 2026-02-04 06:56:58 -05:00
parent d841e04a39
commit 35d6965fab
1 changed files with 18 additions and 0 deletions

18
playbooks/ping.yml Normal file
View File

@ -0,0 +1,18 @@
---
- name: Test connectivity to all hosts
hosts: all
gather_facts: false
tasks:
- name: Ping all hosts
ansible.builtin.ping:
- name: Gather basic facts
ansible.builtin.setup:
gather_subset:
- min
register: host_facts
- name: Display host info
ansible.builtin.debug:
msg: "{{ inventory_hostname }} - {{ ansible_host | default('localhost') }} - {{ host_facts.ansible_facts.ansible_distribution | default('N/A') }} {{ host_facts.ansible_facts.ansible_distribution_version | default('') }}"