blob: a9b5dec1b19d39b7304649138029d7bee3175617 (
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
|
---
- 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:///var/run/dockershim.sock"
- name: create systemd snippet directory
file:
path: /etc/systemd/system/kubelet.service.d/
state: directory
- name: install systemd snippet to make sure kubelet starts after docker
copy:
content: |
[Unit]
After=docker.service
dest: /etc/systemd/system/kubelet.service.d/after-docker.conf
- name: disable bridge and iptables in docker daemon config and switch to systemd cgroup driver
set_fact:
docker_daemon_config_override:
exec-opts:
- "native.cgroupdriver=systemd"
bridge: "none"
iptables: false
- name: override mandatory settings in docker_daemon_config
set_fact:
docker_daemon_config: "{{ docker_daemon_config | default({}) | combine(docker_daemon_config_override, recursive=True, list_merge='append') }}"
- name: install docker
include_role:
name: docker/engine
|