Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
tingweiwang
/
k8s
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 481d52a5
authored
Jan 07, 2020
by
tingweiwang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete 0-sshpass.sh
1 parent
d6e51aa9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
18 deletions
script/k8s/0-sshpass.sh
script/k8s/0-sshpass.sh
deleted
100755 → 0
View file @
d6e51aa
#!/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配置成功"
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment