-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathreset.yml
executable file
·41 lines (35 loc) · 1.05 KB
/
reset.yml
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
37
38
39
40
41
#!/usr/bin/env ansible-playbook
---
- name: Common tasks for every playbooks
import_playbook: boilerplate.yml
- name: Reset cluster
hosts: etcd:k8s_cluster:calico_rr
gather_facts: true
become: true
collections:
- kubernetes_sigs.kubespray
tasks:
- name: Set Kubespray defaults
ansible.builtin.include_role:
name: kubespray-defaults
- name: Run Kubespray reset role
ansible.builtin.include_role:
name: reset
vars:
bin_dir: /usr/bin
containerd_storage_dir: /var/lib/containerd
deploy_container_engine: true
etcd_config_dir: /etc/ssl/etcd
etcd_data_dir: /var/lib/etcd
etcd_events_data_dir: /var/lib/etcd-events
kube_config_dir: /etc/kubernetes
krew_root_dir: /usr/local/krew
nginx_config_dir: /etc/nginx
- name: Kubeadm reset with force
ansible.builtin.command:
cmd: kubeadm reset -f
changed_when: true
- name: Remove /etc/cni/net.d
ansible.builtin.file:
path: /etc/cni/net.d
state: absent