Files
raspi/playbooks/add_k3s_requirements.yml
2024-11-06 15:57:11 -05:00

23 lines
667 B
YAML

---
- name: Ensure required parameters are in /boot/firmware/cmdline.txt
hosts: all
become: yes
tasks:
- name: Append kernel parameters to cmdline.txt if not present
lineinfile:
path: /boot/firmware/cmdline.txt
line: "cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory"
insertafter: EOF
state: present
create: yes
backup: yes # This creates a backup of the file before making changes
notify:
- Reboot system
handlers:
- name: Reboot system
reboot:
msg: "Rebooting system to apply new kernel parameters"
reboot_timeout: 600
test_command: uptime