mirror of
https://git.bibube.com/nguyen/raspi.git
synced 2024-11-22 22:42:14 +00:00
23 lines
667 B
YAML
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
|