blob: cf8adc4ebf39ada16edc381b7e6e5b724a6d745c (
plain) (
blame)
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
30
31
32
33
34
35
36
|
---
- name: make sure the kubernetes_cri_socket variable is configured correctly
assert:
msg: "The variable kubernetes_cri_socket is not configured correctly. You might need to move your host to the group kubernetes-cluster or standalone-kubelet!"
that:
- kubernetes_cri_socket == "unix:///run/containerd/containerd.sock"
- name: switch to systemd cgroup driver
set_fact:
containerd_config_override:
plugins:
"io.containerd.grpc.v1.cri":
disable_apparmor: true
sandbox_image: "{{ kubernetes_cri_sandbox_image }}"
containerd:
runtimes:
runc:
options:
SystemdCgroup: true
- name: switch to zfs-snapshotter for cri
when: "containerd_storage is defined and containerd_storage.type == 'zfs'"
set_fact:
containerd_config_override_zfs:
plugins:
"io.containerd.grpc.v1.cri":
containerd:
snapshotter: "zfs"
- name: override mandatory settings in containerd_config
set_fact:
containerd_config: "{{ containerd_config | default({}) | combine(containerd_config_override, recursive=True) | combine((containerd_config_override_zfs | default({})), recursive=True) }}"
- name: install containerd
include_role:
name: containerd
|