#!/bin/bash
dir=$(dirname $0)

\cp ${dir}/config ${dir}/ansible/hosts/hosts
ansible-playbook -i ${dir}/ansible/hosts/hosts ${dir}/ansible/03* --tags=uninstall --become  --become-method=sudo --become-user=root
ansible-playbook -i ${dir}/ansible/hosts/hosts ${dir}/ansible/04* --tags=uninstall --become  --become-method=sudo --become-user=root
sleep 3
echo -e "\033[32m>>>>卸载k8s集群成功，清楚了全部数据目录，并且清除了所有网络残留痕迹\033[0m"
