Commit 481d52a5 by tingweiwang

Delete 0-sshpass.sh

1 parent d6e51aa9
Showing with 0 additions and 18 deletions
#!/bin/bash
#author:王庭威
#descrip:无交互分发密钥
#date:2019.01.29
echo "开始安装ansbile"
apt update --allow-insecure-repositories
apt install ansible -y --allow-unauthenticated
echo "拷贝ansible-hosts文件"
cp /root/k8s/config/ansible-hosts /etc/ansible/hosts
port=22
password=123456
for ip in 192.168.1.{41..42}
#for ip in 192.168.1.32
do
sshpass -p $password ssh-copy-id -i ~/.ssh/id_rsa.pub -p $port -o StrictHostKeyChecking=no root@$ip
done
ansible all -m ping && echo "ansible配置成功"
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!