Last active
November 19, 2015 22:23
-
-
Save jacqueswww/2ab396611b29584a40c0 to your computer and use it in GitHub Desktop.
Ansible bootstrap
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 | |
# bootstrap a container to accept ansible. | |
key_location="https://github.com/jacqueswww.keys" | |
sudo apt-get install -y curl python | |
sudo mkdir /root/.ssh/ | |
sudo chmod 600 /root/.ssh/ | |
sudo curl $key_location > /root/.ssh/authorized_keys | |
sudo echo "ListenAddress 0.0.0.0" >> /etc/ssh/sshd_config | |
sudo sed -i /etc/ssh/sshd_config -e 's/PermitRootLogin without-password/PermitRootLogin yes/' | |
sudo service ssh restart |
sudo apt-get install -y wget && wget git.io/v4K74 -O - | bash
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
shorturl: http://git.io/v4K74