mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2025-12-25 00:12:37 +01:00
24 lines
882 B
YAML
24 lines
882 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.replace:
|
|
path: /boot/firmware/cmdline.txt
|
|
regexp: '^([\w](?!.*\b{{ cgroup_item }}\b).*)$'
|
|
replace: '\1 {{ cgroup_item }}'
|
|
with_items:
|
|
- "cgroup_enable=cpuset"
|
|
- "cgroup_memory=1"
|
|
- "cgroup_enable=memory"
|
|
loop_control:
|
|
loop_var: cgroup_item
|
|
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: "{{ airgap_dir is not defined }}"
|
|
state: present
|
|
when: "ansible_distribution_version is version('20.10', '>=') and ansible_distribution_version is version('24.04', '<')"
|