2022-10-30 07:56:06 -04:00
|
|
|
---
|
2022-10-30 09:25:47 -04:00
|
|
|
- name: create containerd config dir
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: /etc/containerd
|
|
|
|
state: directory
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0664
|
|
|
|
|
|
|
|
- name: create containerd default config
|
|
|
|
ansible.builtin.shell:
|
|
|
|
cmd: |
|
|
|
|
containerd config default > /etc/containerd/config.toml
|
|
|
|
creates: /etc/containerd/config.toml
|
|
|
|
|
|
|
|
- name: enable systemd cgroups in containerd config
|
|
|
|
ansible.builtin.lineinfile:
|
|
|
|
path: /etc/containerd/config.toml
|
|
|
|
regexp: '^(.*)SystemdCgroup = false$'
|
|
|
|
line: ' SystemdCgroup = true'
|
|
|
|
backrefs: true
|
|
|
|
state: present
|