From 2406f5f9e83cdcc5400ad9d4cb2bd44df113132e Mon Sep 17 00:00:00 2001 From: Wendell Jones Date: Wed, 10 Sep 2025 08:22:26 -0400 Subject: [PATCH] refactor: update reboot task to use conditional check for reboot requirement in linux_updates.yaml --- linux_updates.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/linux_updates.yaml b/linux_updates.yaml index 38a189f..f7a1329 100644 --- a/linux_updates.yaml +++ b/linux_updates.yaml @@ -37,10 +37,12 @@ ansible.builtin.apt: autoremove: yes - - name: Reboot when packages were updated - reboot: - post_reboot_delay: 60 - when: apt_update_status.changed + - name: Reboot if required + ansible.builtin.reboot: + reboot_timeout: 600 # Adjust timeout as needed + when: reboot_required_file.stat.exists + vars: + reboot_required_file: /var/run/reboot-required #- hosts: apkhosts # tasks: