setup.sh 869 B

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