Skip to content

Instantly share code, notes, and snippets.

@mi11y
Created May 27, 2020 04:40
Show Gist options
  • Save mi11y/a76194ff40134b095b1ee76994cebf7f to your computer and use it in GitHub Desktop.
Save mi11y/a76194ff40134b095b1ee76994cebf7f to your computer and use it in GitHub Desktop.
CS 312 hw 7
#!/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