diff --git a/linux_updates.yaml b/linux_updates.yaml index a0986d5..7f780b3 100644 --- a/linux_updates.yaml +++ b/linux_updates.yaml @@ -36,13 +36,16 @@ # - name: Clean up unused dependencies # ansible.builtin.apt: # autoremove: yes + - name: Check if a file exists + ansible.builtin.stat: + path: /var/run/reboot-required + register: reboot_required_file + - name: Reboot if required ansible.builtin.reboot: reboot_timeout: 120 # Adjust timeout as needed when: reboot_required_file.stat.exists - vars: - reboot_required_file: /var/run/reboot-required - + #- hosts: apkhosts # tasks: # - name: Update the Package Repositories