summaryrefslogtreecommitdiff
path: root/roles/kubernetes/standalone/tasks/main.yml
blob: 241c3136f871e2781e2d0ea2a56e400961747c69 (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: create systemd override directory for kubelet
  file:
    path: /etc/systemd/system/kubelet.service.d
    state: directory

- name: install systemd override for kubelet
  template:
    src: kubelet.service.override.j2
    dest: /etc/systemd/system/kubelet.service.d/standalone.conf
  notify: restart kubelet

- name: install kubelet config
  template:
    src: kubelet-config.yml.j2
    dest: /etc/kubernetes/kubelet.yml
  notify: restart kubelet

- name: make sure kubelet is enabled and running
  systemd:
    name: kubelet.service
    state: started
    enabled: yes
    daemon_reload: yes

- name: create cni config directory
  file:
    name: /etc/cni/net.d
    state: directory

- name: install cni config
  template:
    src: "cni-{{ kubernetes_standalone_cni_variant }}.conflist.j2"
    dest: /etc/cni/net.d/kube-standalone.conflist