Ensure CGroupV2 is enabled
This commit is contained in:
parent
16aeded91d
commit
63660c95f0
@ -61,5 +61,27 @@
|
|||||||
notify:
|
notify:
|
||||||
- 'ensure_podman.package_facts'
|
- 'ensure_podman.package_facts'
|
||||||
- 'ensure_podman.service_facts'
|
- 'ensure_podman.service_facts'
|
||||||
|
- name: 'Fetch kernel command line'
|
||||||
|
when:
|
||||||
|
- ansible_system = 'Linux'
|
||||||
|
- ensure_podman is defined
|
||||||
|
- ansible_distribution == 'Fedora'
|
||||||
|
- ansible_distribution_major_version is version('32', '>=')
|
||||||
|
shell: |
|
||||||
|
cat /proc/cmdline
|
||||||
|
register: 'results'
|
||||||
|
changed_when: 'false'
|
||||||
|
- name: 'Remove cgroups v1 if enabled'
|
||||||
|
when:
|
||||||
|
- results is defined
|
||||||
|
- ' "systemd.unified_cgroup_hierarchy=0" in results.stdout '
|
||||||
|
shell:
|
||||||
|
cmd: |
|
||||||
|
grubby --update-kernel=ALL --remove args=systemd.unified_cgroup_hierarchy=0
|
||||||
|
- name: 'Reboot to disable cgroups v1'
|
||||||
|
when:
|
||||||
|
- results is defined
|
||||||
|
- ' "systemd.unified_cgroup_hierarchy=0" in results.stdout '
|
||||||
|
reboot:
|
||||||
- name: 'flush handlers'
|
- name: 'flush handlers'
|
||||||
meta: 'flush_handlers'
|
meta: 'flush_handlers'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user