-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontainerd.yml
More file actions
29 lines (25 loc) · 772 Bytes
/
Copy pathcontainerd.yml
File metadata and controls
29 lines (25 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
---
- name: Install containerd
ansible.builtin.apt:
name: containerd
state: present
- name: Create the containerd config directory
ansible.builtin.file:
path: /etc/containerd
state: directory
mode: "0755"
- name: Generate the default containerd config
ansible.builtin.shell: containerd config default > /etc/containerd/config.toml
args:
creates: /etc/containerd/config.toml
- name: Configure containerd to use the systemd cgroup driver
ansible.builtin.lineinfile:
path: /etc/containerd/config.toml
regexp: "SystemdCgroup = false"
line: " SystemdCgroup = true"
notify: Restart containerd
- name: Start the containerd service
ansible.builtin.systemd:
name: containerd
state: started
enabled: true