summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2024-03-10 03:19:47 +0100
committerChristian Pointner <equinox@spreadspace.org>2024-03-10 03:19:47 +0100
commitee169a2a9ed67ca1274372a8645f644cb4a8ffcb (patch)
tree3fc2939c3d2cf34fb8e2b96f70bb8ef3ee071fe6 /roles
parentraspios: remove dphys-swapfile and finalize interface config for bookworm+ (diff)
upgrade ch-epimetheus to bookworm
Diffstat (limited to 'roles')
-rw-r--r--roles/kodi/standalone/tasks/main.yml9
-rw-r--r--roles/prepare-dkms/tasks/raspberrypi.yml22
2 files changed, 28 insertions, 3 deletions
diff --git a/roles/kodi/standalone/tasks/main.yml b/roles/kodi/standalone/tasks/main.yml
index 9cb891cf..a4382911 100644
--- a/roles/kodi/standalone/tasks/main.yml
+++ b/roles/kodi/standalone/tasks/main.yml
@@ -21,6 +21,15 @@
state: present
notify: restart kodi
+- name: make sure to install correct packages on raspi-os
+ when: "'raspios' in group_names"
+ copy:
+ content: |
+ Package: kodi*
+ Pin: release o=Raspberry Pi Foundation
+ Pin-Priority: 900
+ dest: /etc/apt/preferences.d/kodi.pref
+
- name: use kodi packages from backports
when: kodi_standalone_use_backports
block:
diff --git a/roles/prepare-dkms/tasks/raspberrypi.yml b/roles/prepare-dkms/tasks/raspberrypi.yml
index 709a1fdf..9ece31bf 100644
--- a/roles/prepare-dkms/tasks/raspberrypi.yml
+++ b/roles/prepare-dkms/tasks/raspberrypi.yml
@@ -1,7 +1,23 @@
---
-- name: install kernel-headers
+- name: install legacy raspberry kernel-headers
+ when: (ansible_distribution_major_version | int) <= 11
apt:
name:
- - raspberrypi-kernel-headers
- - dkms
+ - raspberrypi-kernel-headers
+ - dkms
state: present
+
+- when: (ansible_distribution_major_version | int) > 11
+ block:
+ - name: figure out which kernel is currently running
+ check_mode: no
+ command: uname -r
+ changed_when: false
+ register: raspberry_pi_uname
+
+ - name: install raspberry kernel-headers
+ apt:
+ name:
+ - "linux-headers-rpi-{{ raspberry_pi_uname.stdout | split('-') | last }}"
+ - dkms
+ state: present