I am setting up to use ansible, need to set up ssh keys on numerous servers to receive playbooks (updates and scripts) using a key instead of a password to initiate the ssh session. I've written a bash script that copies the public key into the destination server, and it works well, once that is done I am able to ssh in without a password. I'd like to write into the script that it executes this on numerous IP's (which are not consecutive). Any suggestions on how to set that up? Here's psuedo code for what I'm trying to do:
List of IP addresses:
IP1
IP2
IP3
...
IP500
bash script:
x=1
for IPx:
do foo
when done
x=x+1
go back to for IPx line
If x not on list (all IP addresses done)
exit
regards, Richard
Bookmarks