Created
May 27, 2020 04:40
-
-
Save mi11y/a76194ff40134b095b1ee76994cebf7f to your computer and use it in GitHub Desktop.
CS 312 hw 7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Ssh key | |
ssh-keygen -t rsa -f id_rsa -N '' | |
# copy them over | |
ssh-copy-id -i ~/.ssh/id_rsa root@192.168.1.21 | |
ssh-copy-id -i ~/.ssh/id_rsa root@192.168.1.22 | |
ssh-copy-id -i ~/.ssh/id_rsa root@192.168.1.23 | |
ssh-copy-id -i ~/.ssh/id_rsa root@192.168.1.24 | |
# Do ansible stuff | |
ansible-playbook webserver.yaml -i hosts.ini | |
# Get content | |
curl 192.168.1.21 | |
curl 192.168.1.22 | |
curl 192.168.1.23 | |
curl 192.168.1.24 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment