From 73fb9ac9765d1a2ed85ee14eadfc1c11ee374e83 Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Tue, 10 Dec 2024 16:15:40 -0500 Subject: [PATCH] better functionality --- defaults/main.yml | 3 ++- tasks/main.yml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 8c301e5..38727f3 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -2,8 +2,9 @@ verified_reboot_reboot_time: 1 # Time in minutes issued to the shutdown command verified_reboot_reboot_msg: '*** ANSIBLE INITIATED REBOOT ***' verified_reboot_bootid_file: /proc/sys/kernel/random/boot_id + +# Maximum number of times to check for a successful reboot verified_reboot_max_checks: 10 -verified_reboot_check_count: 0 # Maximum number of seconds to wait for a connection to happen before closing and retrying. verified_reboot_wait_conn_timeout: 20 diff --git a/tasks/main.yml b/tasks/main.yml index 6458209..ae320e4 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -7,6 +7,7 @@ - name: Set pre-reboot boot ID ansible.builtin.set_fact: verified_reboot_pre_boot_id: "{{ verified_reboot_pre_boot_id_raw['content'] | b64decode | trim }}" + verified_reboot_check_count: 0 - name: Reboot the host ansible.builtin.command: