Files
k3s-ansible/roles/raspberrypi/tasks/prereq/Ubuntu.yml
haseHH 71d6ba0580 Don't install linux-modules-extra-raspi on Ubuntu 24.04 and up (#346)
The extra modules were merged into the normal modules packet as of Kernel 6.8/Ubuntu 24.04

Signed-off-by: haseHH <christian@hase.hamburg>
2024-07-11 10:18:06 -07:00

19 lines
810 B
YAML

---
- name: Enable cgroup via boot commandline if not already enabled
when: lookup('fileglob', '/boot/firmware/cmdline.txt', errors='warn') | length > 0
ansible.builtin.lineinfile:
path: /boot/firmware/cmdline.txt
backrefs: true
regexp: '^((?!.*\bcgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\b).*)$'
line: '\1 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory'
notify: Reboot Pi
- name: Install Ubuntu Raspi Extra Packages
ansible.builtin.apt:
# Fixes issues in newer Ubuntu where VXLan isn't setup right.
# See: https://github.com/k3s-io/k3s/issues/4234
name: linux-modules-extra-raspi
update_cache: true
state: present
when: "ansible_distribution_version is version('20.10', '>=') and ansible_distribution_version is version('24.04', '<')"