#!/bin/bash
dir=$PWD

echo -e "\033[32m>>>>部署ansible\033[0m"
#${dir}/shell/install-ansible.sh

#\cp ${dir}/config ${dir}/ansible/hosts/hosts
ansible-playbook -i ${dir}/kingdee_hosts ${dir}/../k8s-install/ansible/00* --become  --become-method=sudo --become-user=root
ansible-playbook -i ${dir}/kingdee_hosts ${dir}/../k8s-install/ansible/10* 
ansible-playbook -i ${dir}/kingdee_hosts ${dir}/../k8s-install/ansible/01* --become  --become-method=sudo --become-user=root
echo -e "选择是否现在重启[Y/N]：\c"
ansible-playbook -i ${dir}/kingdee_hosts ${dir}/../k8s-install/ansible/02* --become  --become-method=sudo --become-user=root
echo -e "\033[32m>>>>更新内核完毕，自动重启系统完成之后(约2-3分钟)~,执行"install.sh"\033[0m"
