chef-recipes/roles/enable-cgroup-v2/tasks/main.yml

13 lines
375 B
YAML
Raw Normal View History

2023-02-07 13:02:43 +00:00
# code: language=ansible
2023-02-01 17:34:56 +00:00
- name: Check if cgroup v2 is available
ansible.builtin.command: grep cgroup2 /proc/filesystems
register: cgroup2_present
2023-02-06 09:11:03 +00:00
changed_when: cgroup2_present.rc != 0
2023-02-01 17:34:56 +00:00
- name: Enable cgroup v2
ansible.builtin.command: 'grubby --update-kernel=ALL --add-args="systemd.unified_cgroup_hierarchy=1"'
become: true
when:
2023-02-06 09:11:03 +00:00
- cgroup2_present.rc != 0