blob: f797ddb6179884655a030cc253d98d65488b9b73 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
---
- name: Drain master node
command: kubectl drain {{ ansible_hostname }} --delete-local-data --force --ignore-daemonsets
- name: Delete master node
command: kubectl delete node {{ ansible_hostname }}
- name: Kubeadm reset (master)
shell: yes y | sudo kubeadm reset
- name: Delete /etc/cni/net.d/ (master)
command: sudo rm -rf /etc/cni/net.d/
- name: Delete $HOME/.kube/
file:
path: $HOME/.kube/
state: absent
- name: Delete init log file
file:
path: "{{ token_file }}"
state: absent
|