bastion update

This commit is contained in:
havelight-ee
2023-06-28 15:48:32 +09:00
parent 90de942c4a
commit e3a240bc41
28 changed files with 649 additions and 13 deletions

4
ansible/rsa_key/asdf.sh Normal file
View File

@@ -0,0 +1,4 @@
while read line
do
echo ${line}
done < ip_list

37
ansible/rsa_key/ip_list Normal file
View File

@@ -0,0 +1,37 @@
10.10.43.111
10.10.43.112
10.10.43.113
10.10.43.114
10.10.43.115
10.10.43.116
10.10.43.117
10.10.43.118
10.10.43.119
10.10.43.120
10.10.43.121
10.10.43.122
10.10.43.123
10.10.43.124
10.10.43.125
10.10.43.126
10.10.43.127
10.10.43.128
10.10.43.129
10.10.43.130
10.10.43.131
10.10.43.132
10.10.43.133
10.10.43.134
10.10.43.135
10.10.43.136
10.10.43.137
10.10.43.138
10.10.43.140
10.10.43.141
10.10.43.142
10.10.43.143
10.10.43.144
10.10.43.145
10.10.43.146
10.10.43.147
10.10.43.148

View File

@@ -2,7 +2,7 @@
set password [lindex $argv 0]
set host [lindex $argv 1]
spawn ssh-copy-id -o StrictHostKeyChecking=no ubuntu@$host
spawn ssh-copy-id -o StrictHostKeyChecking=no root@$host
expect "password:"
send "$password\n"
expect eof

View File

@@ -1,13 +1,9 @@
#!/bin/bash
if [ -z "$BASH_VERSION" ]; then exec bash "$0" "$@"; exit; fi
#if [ -z "$BASH_VERSION" ]; then exec bash "$0" "$@"; exit; fi
if [ $1 == '' ]; then exit
else; passwd=$1
passwd=$1
while read ip
do
echo ${ip}
#./key.sh ${passwd} ${ip}
./key.sh ${passwd} ${ip}
done < ip_list