From 469aeecb037fc2eedbaefcaa48cf0a7ebe3d3d5b Mon Sep 17 00:00:00 2001 From: Bernd Wachter Date: Thu, 7 Mar 2024 18:09:36 +0200 Subject: [PATCH] Add connectivity-check playbook --- playbooks/connectivity-check.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 playbooks/connectivity-check.yml diff --git a/playbooks/connectivity-check.yml b/playbooks/connectivity-check.yml new file mode 100644 index 0000000..027aa3a --- /dev/null +++ b/playbooks/connectivity-check.yml @@ -0,0 +1,10 @@ +# this is a simple playbook to check inventory hosts for reachability +- hosts: all + vars: + ansible_user: management + tasks: + - set_fact: + unreachable: "{{ ansible_play_hosts_all | difference(ansible_play_hosts)}}" + ansible_ssh_common_args: "-o StrictHostKeyChecking=no" + - debug: + msg: "Unreachable systems: {{unreachable}}"