restructure repo

This commit is contained in:
DerLinkman
2024-11-22 20:33:29 +01:00
parent 5a0f229511
commit 344c9508ea
17 changed files with 184 additions and 43 deletions
@@ -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"