blob: 0c400e2ca19e62100acf63796dacb547f4936926 (
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
|
---
- 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:
- not kubernetes_cri_socket
- 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
set_fact:
docker_daemon_config: "{{ docker_daemon_config | default({}) | combine({'exec-opts': ['native.cgroupdriver=systemd'], 'bridge': 'none', 'iptables': false}) }}"
- name: install docker
include_role:
name: docker
|