From 782aa942106ecc8f70605d20522ef716ab9a9622 Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Thu, 1 Aug 2024 10:41:45 -0400 Subject: [PATCH] Add reboot code to match scneario --- tasks/grub_filesystem_check.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tasks/grub_filesystem_check.yml b/tasks/grub_filesystem_check.yml index cdff1a1..a1ee48d 100644 --- a/tasks/grub_filesystem_check.yml +++ b/tasks/grub_filesystem_check.yml @@ -4,17 +4,27 @@ name: autofsck tasks_from: main.yml -- name: Flush handlers +- name: Flush handlers to add Grub parameters for fsck ansible.builtin.meta: flush_handlers # Make sure to update the reboot code for the WF environment +# - name: Reboot to run filesystem checks +# ansible.builtin.reboot: + - name: Reboot to run filesystem checks - ansible.builtin.reboot: + ansible.builtin.command: /sbin/shutdown -r +1 + +- name: Wait for the reboot to complete + ansible.builtin.wait_for_connection: + connect_timeout: 20 + sleep: 10 + delay: "{{ bigboot_post_reboot_delay | default('70') }}" + timeout: "{{ bigboot_reboot_timeout | default('1800') }}" - name: Disable Grub filesystem check ansible.builtin.import_role: name: autofsck tasks_from: cleanup.yml -- name: Flush handlers +- name: Flush handlers to remove Grub parameters for fsck ansible.builtin.meta: flush_handlers