restructure repo
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
- name: Upgrade all installed packages
|
||||
apt:
|
||||
upgrade: full
|
||||
update_cache: yes
|
||||
notify:
|
||||
- apt cleanup
|
||||
|
||||
- name: Check if a kernel update is available
|
||||
shell: |
|
||||
dpkg -l | grep -E 'linux-image-[0-9]' | awk '{print $2}' | sort | tail -n 1
|
||||
register: latest_kernel
|
||||
|
||||
- name: Check if running kernel matches the latest installed kernel
|
||||
shell: uname -r | grep -c "{{ latest_kernel.stdout }}"
|
||||
register: kernel_match
|
||||
changed_when: false
|
||||
|
||||
- name: Mark reboot required if a new kernel is installed
|
||||
set_fact:
|
||||
reboot_required: "yes"
|
||||
notify:
|
||||
- Reboot system
|
||||
when: kernel_match.stdout == "0"
|
||||
Reference in New Issue
Block a user