update state
This commit is contained in:
@@ -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"
|
||||
Reference in New Issue
Block a user