mirror of
https://github.com/techno-tim/k3s-ansible.git
synced 2026-03-12 07:42:11 +01:00
Compare commits
4 Commits
v1.30.2+k3
...
b274255b6f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b274255b6f | ||
|
|
0919571744 | ||
|
|
7db9f5bd9b | ||
|
|
842bfd8de9 |
@@ -1,7 +1,17 @@
|
|||||||
---
|
---
|
||||||
|
- name: Test for cmdline path
|
||||||
|
command: grep -E "console=|rootfstype" /boot/cmdline.txt
|
||||||
|
register: boot_cmdline_path
|
||||||
|
failed_when: false
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
- name: Set path to cmdline based on test
|
||||||
|
set_fact:
|
||||||
|
cmdline_path: "{{ (boot_cmdline_path.rc == 0) | ternary('/boot/cmdline.txt', '/boot/firmware/cmdline.txt') }}"
|
||||||
|
|
||||||
- name: Activating cgroup support
|
- name: Activating cgroup support
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /boot/cmdline.txt
|
path: "{{ cmdline_path }}"
|
||||||
regexp: '^((?!.*\bcgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\b).*)$'
|
regexp: '^((?!.*\bcgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\b).*)$'
|
||||||
line: '\1 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory'
|
line: '\1 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory'
|
||||||
backrefs: true
|
backrefs: true
|
||||||
|
|||||||
Reference in New Issue
Block a user