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
|
- name: Check if /boot/firmware/cmdline.txt exists
|
||||||
when: lookup('fileglob', '/boot/firmware/cmdline.txt', errors='warn') | length > 0
|
ansible.builtin.stat:
|
||||||
ansible.builtin.replace:
|
|
||||||
path: /boot/firmware/cmdline.txt
|
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).*)$'
|
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