mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2025-12-26 00:22:36 +01:00
Handle both new and old cmdline.txt locations in Raspbian (#362)
Signed-off-by: Derek Nola <derek.nola@suse.com>
This commit is contained in:
@@ -1,7 +1,12 @@
|
|||||||
---
|
---
|
||||||
|
- name: Check if /boot/firmware/cmdline.txt exists
|
||||||
|
ansible.builtin.stat:
|
||||||
|
path: /boot/firmware/cmdline.txt
|
||||||
|
register: boot_firmware_cmdline_txt
|
||||||
|
|
||||||
- name: Enable cgroup via boot commandline if not already enabled
|
- name: Enable cgroup via boot commandline if not already enabled
|
||||||
ansible.builtin.replace:
|
ansible.builtin.replace:
|
||||||
path: /boot/cmdline.txt
|
path: "{{ (boot_firmware_cmdline_txt.stat.exists) | ternary('/boot/firmware/cmdline.txt', '/boot/cmdline.txt') }}"
|
||||||
regexp: '^([\w](?!.*\b{{ cgroup_item }}\b).*)$'
|
regexp: '^([\w](?!.*\b{{ cgroup_item }}\b).*)$'
|
||||||
replace: '\1 {{ cgroup_item }}'
|
replace: '\1 {{ cgroup_item }}'
|
||||||
with_items:
|
with_items:
|
||||||
|
|||||||
Reference in New Issue
Block a user