2019-06-02 00:04:33 +08:00
|
|
|
#
|
2021-01-07 09:30:50 +08:00
|
|
|
- import_tasks: clean_etcd.yml
|
|
|
|
when: 'DEL_ETCD == "yes"'
|
|
|
|
|
2019-06-02 00:04:33 +08:00
|
|
|
- import_tasks: clean_master.yml
|
|
|
|
when: 'DEL_MASTER == "yes"'
|
|
|
|
|
|
|
|
- import_tasks: clean_node.yml
|
|
|
|
when: 'DEL_NODE == "yes"'
|
|
|
|
|
|
|
|
- import_tasks: clean_lb.yml
|
|
|
|
when: 'DEL_LB == "yes"'
|
|
|
|
|
|
|
|
- import_tasks: clean_chrony.yml
|
|
|
|
when: 'DEL_CHRONY == "yes"'
|
|
|
|
|
|
|
|
- name: clean 'ENV PATH'
|
|
|
|
lineinfile:
|
|
|
|
dest: ~/.bashrc
|
|
|
|
state: absent
|
|
|
|
regexp: '{{ item }}'
|
|
|
|
with_items:
|
|
|
|
- 'kubeasz'
|
|
|
|
- 'helm completion'
|
|
|
|
- 'kubectl completion'
|
|
|
|
- 'crictl completion'
|
|
|
|
- 'HELM_TLS_ENABLE'
|
|
|
|
when: 'DEL_ENV == "yes"'
|
2019-07-19 10:47:38 +08:00
|
|
|
|
2022-06-13 19:03:45 +08:00
|
|
|
#- name: remove binaries
|
2020-05-28 14:05:03 +08:00
|
|
|
# file: name={{ item }} state=absent
|
|
|
|
# with_items:
|
|
|
|
# - "/opt/kube/bin"
|
|
|
|
# when: 'DEL_ETCD == "yes" and DEL_NODE == "yes" and DEL_MASTER == "yes"'
|
2020-02-01 02:05:43 +08:00
|
|
|
|
2019-07-19 10:47:38 +08:00
|
|
|
- name: 重启提示 WARNNING
|
|
|
|
debug:
|
|
|
|
msg: "[重要]: 请重启节点以确保清除系统残留的虚拟网卡、路由信息、iptalbes|ipvs规则等 \
|
|
|
|
[IMPORTANT]: please reboot nodes, makesure to clean out net interfaces, routes and iptables/ipvs rules"
|
2020-05-18 11:42:13 +08:00
|
|
|
when: 'DEL_ETCD == "yes" and DEL_NODE == "yes" and DEL_MASTER == "yes"'
|