Last active
December 23, 2015 21:29
-
-
Save hyperfocus1338/6696657 to your computer and use it in GitHub Desktop.
Shell script for Packer build
This file contains hidden or 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
#!/usr/bin/env bash -x | |
echo 'update software' | |
sudo apt-get update -y | |
sleep 2 | |
echo 'install openssh' | |
sudo apt-get install openssh-client openssh-server -y | |
sleep 2 | |
echo 'install python-mysqldb' | |
sudo apt-get install python-mysqldb -y | |
sleep 2 | |
echo 'install python dependencies' | |
sudo apt-get install python-yaml python-jinja2 python-paramiko python-software-properties -y | |
sleep 2 | |
echo 'install overige packages' | |
sudo apt-get install nano software-properties-common -y | |
sleep 2 | |
echo 'add ansible repository deb' | |
echo 'deb http://ppa.launchpad.net/rquillo/ansible/ubuntu precise main' | sudo tee -a /etc/apt/sources.list | |
sleep 2 | |
echo 'add ansible repository deb-src' | |
echo 'deb-src http://ppa.launchpad.net/rquillo/ansible/ubuntu precise main' | sudo tee -a /etc/apt/sources.list | |
sleep 2 | |
echo 'install ansible' | |
sudo apt-get install ansible -y | |
sleep 2 | |
echo 'ssh map maken' | |
mkdir -p /home/vagrant/.ssh | |
sleep 2 | |
echo 'recreate authorized keys' | |
echo '' | sudo tee /home/vagrant/.ssh/authorized_keys | |
sudo chmod 600 /home/vagrant/.ssh/authorized_keys | |
sudo chown vagrant /home/vagrant/.ssh/authorized_keys | |
sleep 2 | |
echo 'maak ansible hosts bestand aan' | |
echo 'lolplekdev ansible_ssh_host=192.168.2.2 ansible_ssh_user=vagrant' | sudo tee -a /etc/ansible/hosts | |
sleep 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment