blob: 29b88847fe553a6624e75f1e6cf5271606e7916b (
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: clean up settings and files created by kubeadm
command: kubeadm reset -f --cleanup-tmp-dir
- name: clean up extra configs and logs
loop:
- /etc/kubernetes/kubeadm.config
- /etc/kubernetes/kubeadm-init.log
- /etc/kubernetes/kubeadm-init.errors
- /etc/kubernetes/kubeadm-join.log
- /etc/kubernetes/kubeadm-join.errors
- /etc/kubernetes/pki
- /etc/kubernetes/encryption
- /etc/kubernetes/network-plugin
- /etc/kubernetes/addons
- /etc/kubernetes/decorations
- /etc/default/kubelet
file:
path: "{{ item }}"
state: absent
- name: get list of all cni configs
find:
paths: /etc/cni/net.d
register: kubeadm_reset_cni
- name: remove all cni configs
loop: "{{ kubeadm_reset_cni.files }}"
loop_control:
label: "{{ item.path }}"
file:
path: "{{ item.path }}"
state: absent
- name: extra-cleanup for kubeguard network plugin
import_tasks: net_kubeguard.yml
|