mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2025-12-26 00:22:36 +01:00
* More flexible cgroup settings If there are already required cgroup boot parameters present but in a different order than specified, the script will add them again. It is better to test for the individual parameter in a loop and selectively add them as necessary. Signed-off-by: Marko Vukovic <anonsoftware@gmail.com> Signed-off-by: Marko Vukovic <anonsoftware@gmail.com> Signed-off-by: Marko Vukovic <8951449+anon-software@users.noreply.github.com>
14 lines
371 B
YAML
14 lines
371 B
YAML
---
|
|
- name: Enable cgroup via boot commandline if not already enabled
|
|
ansible.builtin.replace:
|
|
path: /boot/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
|