update state

This commit is contained in:
DerLinkman
2026-02-20 22:19:57 +01:00
parent 0ef603638c
commit ffc1a6a8a5
8 changed files with 63 additions and 9 deletions
+5 -1
View File
@@ -9,6 +9,7 @@
shell: |
dpkg -l | grep -E '^ii' | grep 'linux-image-[0-9]' | awk '{print $2}' | sort | tail -n 1
register: latest_kernel
when: ansible_virtualization_type != 'lxc'
- name: Check if running kernel matches the latest installed kernel
shell: |
@@ -16,8 +17,11 @@
register: kernel_match
changed_when: false
ignore_errors: true
when: ansible_virtualization_type != 'lxc'
- name: Mark reboot required if a new kernel is installed
set_fact:
reboot_required: "yes"
when: kernel_match.stdout == "0"
when:
- ansible_virtualization_type != 'lxc'
- kernel_match.stdout == "0"