mirror of
https://github.com/techno-tim/k3s-ansible.git
synced 2026-09-15 08:33:20 +02:00
Compare commits
8 Commits
b274255b6f
...
a7a932320d
| Author | SHA1 | Date | |
|---|---|---|---|
| a7a932320d | |||
| d325eae726 | |||
| 25d696c762 | |||
| 3b74985767 | |||
| c057a436a1 | |||
| 0919571744 | |||
| 7db9f5bd9b | |||
| 842bfd8de9 |
+1
-1
@@ -6,7 +6,7 @@
|
||||
#
|
||||
ansible-compat==4.1.11
|
||||
# via molecule
|
||||
ansible-core==2.16.3
|
||||
ansible-core==2.16.4
|
||||
# via
|
||||
# -r requirements.in
|
||||
# ansible-compat
|
||||
|
||||
@@ -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 cmdline path based on Debian version and boot_cmdline_path result
|
||||
set_fact:
|
||||
cmdline_path: "{{ (boot_cmdline_path.rc == 0 and ansible_facts['distribution'] == 'Debian' and ansible_facts['distribution_version'] is version('bookworm', '<')) | ternary('/boot/cmdline.txt', '/boot/firmware/cmdline.txt') }}"
|
||||
|
||||
- name: Activating cgroup support
|
||||
lineinfile:
|
||||
path: /boot/cmdline.txt
|
||||
path: "{{ cmdline_path }}"
|
||||
regexp: '^((?!.*\bcgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\b).*)$'
|
||||
line: '\1 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory'
|
||||
backrefs: true
|
||||
|
||||
Reference in New Issue
Block a user