Last active
August 29, 2015 13:57
-
-
Save rjocoleman/9545549 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
apt-get update -qq | |
apt-get install -y make git-core | |
if [[ ! -d /home/vagrant/ansible ]]; then | |
"echo installing ansible" | |
# Install Ansible dependencies. | |
apt-get install -y python-mysqldb python-yaml python-jinja2 python-paramiko sshpass | |
# Checkout the Ansible repository. | |
git clone https://github.com/ansible/ansible.git /home/vagrant/ansible | |
mkdir /etc/ansible | |
echo "localhost" > /etc/ansible/hosts | |
source /home/vagrant/ansible/hacking/env-setup | |
echo "source /home/vagrant/ansible/hacking/env-setup" >> /home/vagrant/.bashrc | |
fi | |
echo "Getting into /vagrant/provisioning" | |
cd /vagrant/provisioning | |
echo "running ansible-playbook" | |
ansible-playbook playbook.yml |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# Create a forwarded port mapping which allows access to a specific port | |
# within the machine from a port on the host machine. In the example below, | |
# accessing "localhost:8080" will access port 80 on the guest machine. | |
config.vm.network :forwarded_port, guest: 80, host: 1235 | |
# Create a private network, which allows host-only access to the machine | |
# using a specific IP. | |
config.vm.network "private_network", ip: "192.168.33.10" | |
if Vagrant.has_plugin?("vagrant-proxyconf") | |
config.proxy.http = "http://squid.eurodyn.com:8080" | |
config.proxy.https = "http://squid.eurodyn.com:8080" | |
#config.proxy.no_proxy = "localhost,127.0.0.1,.example.com" | |
end | |
# Install ansible | |
config.vm.provision :shell, :path => "provisioning/bootstrap.sh" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment