From c32a30f6c3a6505038ccf9b2f5bcded54a37684f Mon Sep 17 00:00:00 2001 From: admingit Date: Thu, 3 Aug 2023 19:00:30 +0200 Subject: [PATCH] add_code_reboot --- Deleted_Splunk.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Deleted_Splunk.yml b/Deleted_Splunk.yml index d165ee8..8a4325b 100644 --- a/Deleted_Splunk.yml +++ b/Deleted_Splunk.yml @@ -34,3 +34,17 @@ - name: "Shutdown VM" shell: shutdown -r now + + - name: Wait for the reboot and reconnect + wait_for: + port: 22 + search_regex: OpenSSH + delay: 10 + timeout: 60 + connection: local + + - name: Check the Uptime of the servers + shell: "uptime" + register: Uptime + + - debug: var=Uptime