More files

This commit is contained in:
2024-11-06 15:57:11 -05:00
parent 73a6d9f007
commit 2ce818aa1e

View File

@@ -0,0 +1,22 @@
---
- 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