Last active
August 29, 2015 14:08
-
-
Save micw/987af53361c1d7de1369 to your computer and use it in GitHub Desktop.
Script to provision a wheezy base box (e.g. a VPS) with ansible.
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 | |
# | |
# USAGE: | |
# [ -f /usr/bin/curl ] || apt-get -y install curl | |
# curl -sSL https://gist.githubusercontent.com/micw/987af53361c1d7de1369/raw/ | /bin/bash | |
set -e | |
if [ ! -f /etc/apt/sources.list.d/wheezy-backports.list ]; then | |
echo "Adding wheezy backport repository" | |
echo "deb http://http.debian.net/debian wheezy-backports main contrib" > /etc/apt/sources.list.d/wheezy-backports.list | |
apt-get update | |
else | |
echo "Already added wheezy backport repository" | |
fi | |
if [ ! -f /usr/bin/nano ]; then | |
echo "Installing nano" | |
apt-get -y install nano | |
else | |
echo "Already installed nano" | |
fi | |
if [ ! -f /usr/bin/git ]; then | |
echo "Installing git" | |
apt-get -y install git | |
else | |
echo "Already installed git" | |
fi | |
if [ ! -f /usr/bin/ansible-playbook ]; then | |
echo "Installing ansible" | |
apt-get -y install ansible | |
else | |
echo "Already installed ansible" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment