From 35d6965fab8ac335e725c701e2d7c6279f4f9380 Mon Sep 17 00:00:00 2001 From: directlx Date: Wed, 4 Feb 2026 06:56:58 -0500 Subject: [PATCH] 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 --- playbooks/ping.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 playbooks/ping.yml diff --git a/playbooks/ping.yml b/playbooks/ping.yml new file mode 100644 index 0000000..b9ccd95 --- /dev/null +++ b/playbooks/ping.yml @@ -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('') }}"