From 24234478bbe2b1603974fb7d7bc1723942c82543 Mon Sep 17 00:00:00 2001 From: alex-local Date: Wed, 10 Sep 2025 10:31:47 +0200 Subject: [PATCH] Add ping test playbook --- ping.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 ping.yml diff --git a/ping.yml b/ping.yml new file mode 100644 index 0000000..cc7d9f0 --- /dev/null +++ b/ping.yml @@ -0,0 +1,18 @@ +--- +- name: Ping Test Playbook + hosts: all + gather_facts: no + tasks: + - name: Test connectivity with ping + ansible.builtin.ping: + register: ping_result + + - name: Display ping result + ansible.builtin.debug: + msg: "Host {{ inventory_hostname }} is reachable" + when: ping_result is succeeded + + - name: Display connection failure + ansible.builtin.debug: + msg: "Host {{ inventory_hostname }} is NOT reachable" + when: ping_result is failed