mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2026-03-09 12:02:11 +01:00
Enforce similar cgroup replacement pattern across OSes, fix lint naming
Signed-off-by: Derek Nola <derek.nola@suse.com>
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
- name: Check if /boot/firmware/cmdline.txt exists
|
||||
ansible.builtin.stat:
|
||||
path: /boot/firmware/cmdline.txt
|
||||
register: boot_firmware_cmdline_txt
|
||||
register: raspberrypi_boot_file
|
||||
|
||||
- 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/cmdline.txt') }}"
|
||||
path: "{{ (raspberrypi_boot_file.stat.exists) | ternary('/boot/firmware/cmdline.txt', '/boot/cmdline.txt') }}"
|
||||
regexp: '^([\w](?!.*\b{{ cgroup_item }}\b).*)$'
|
||||
replace: '\1 {{ cgroup_item }}'
|
||||
loop:
|
||||
@@ -41,10 +41,8 @@
|
||||
community.general.alternatives:
|
||||
path: /usr/sbin/iptables-legacy
|
||||
name: iptables
|
||||
register: ip4_legacy
|
||||
|
||||
- name: Changing to ip6tables-legacy
|
||||
community.general.alternatives:
|
||||
path: /usr/sbin/ip6tables-legacy
|
||||
name: ip6tables
|
||||
register: ip6_legacy
|
||||
|
||||
Reference in New Issue
Block a user