mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2025-12-25 00:12:37 +01:00
Refactor task to add compatibility with cmdline changes on ubuntu 25 (#461)
Signed-off-by: lufisaal <lalves.fs@gmail.com>
This commit is contained in:
committed by
GitHub
parent
9c945da3cc
commit
f06b042aab
@@ -1,8 +1,12 @@
|
||||
---
|
||||
- name: Enable cgroup via boot commandline if not already enabled
|
||||
when: lookup('fileglob', '/boot/firmware/cmdline.txt', errors='warn') | length > 0
|
||||
ansible.builtin.replace:
|
||||
- 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
|
||||
ansible.builtin.replace:
|
||||
path: "{{ (boot_firmware_cmdline_txt.stat.exists) | ternary('/boot/firmware/cmdline.txt', '/boot/firmware/current/cmdline.txt') }}"
|
||||
regexp: '^([\w](?!.*\b{{ cgroup_item }}\b).*)$'
|
||||
replace: '\1 {{ cgroup_item }}'
|
||||
with_items:
|
||||
|
||||
Reference in New Issue
Block a user