#!/bin/bash if [ ! -f /usr/local/bin/ansible ] ; then DEBIAN_FRONTEND=noninteractive sudo apt-get update DEBIAN_FRONTEND=noninteractive sudo apt-get -y upgrade DEBIAN_FRONTEND=noninteractive sudo apt-get -y install python python-dev python-pip python-jinja2 python-markupsafe git sudo pip install ansible > /dev/null 2>&1 fi for key in `find /home/vagrant/.ssh.new -type f -exec grep -l "PRIVATE KEY" {} \; ` ; do cp $key /home/vagrant/.ssh chown -R vagrant:vagrant /home/vagrant/.ssh done if [ ! -f /home/vagrant/.ssh.new/config ] ; then echo 'Host github.com' > /home/vagrant/.ssh/config echo ' StrictHostKeyChecking no' >> /home/vagrant/.ssh/config echo ' UserKnownHostsFile=/dev/null' >> /home/vagrant/.ssh/config else cp /home/vagrant/.ssh.new/config /home/vagrant/.ssh/config chown -R vagrant:vagrant /home/vagrant/.ssh/config fi