mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-26 01:22:51 +00:00
31 lines
712 B
YAML
31 lines
712 B
YAML
---
|
|
# load defaults vars
|
|
- hosts:
|
|
- all
|
|
vars_files:
|
|
- vars/delete_cluster.yaml
|
|
|
|
- import_playbook: hook/pre_install.yaml
|
|
|
|
- hosts:
|
|
- k8s_cluster
|
|
roles:
|
|
- uninstall/kubernetes
|
|
- role: uninstall/cri
|
|
when: .deleteCRI
|
|
post_tasks:
|
|
- name: delete localDNS file
|
|
ignore_errors: true
|
|
command: |
|
|
sed -i ':a;$!{N;ba};s@# kubekey hosts BEGIN.*# kubekey hosts END@@' {{ .item }}
|
|
sed -i ':a;$!{N;ba};s@# kubekey control_plane BEGIN.*# kubekey control_plane END@@' {{ .item }}
|
|
when: .deleteDNS
|
|
loop: "{{ .localDNS | toJson }}"
|
|
|
|
- hosts:
|
|
- etcd
|
|
roles:
|
|
- role: uninstall/etcd
|
|
when: .deleteETCD
|
|
|
|
- import_playbook: hook/post_install.yaml |