12345678910111213141516171819202122232425262728293031323334 |
- # -*- mode: ruby -*-
- # vi: set ft=ruby :
- #
- Vagrant.configure("2") do |config|
- # This is going to mount your ~/Code directory
- config.vm.synced_folder "~/Code", "/home/vagrant/Code"
- # Forwarding Ports - you should add any necessary ports here
- config.vm.network "forwarded_port", guest: 2112, host: 2112
- # Mount the ansible dirs here and your ssh directory so we
- # can copy over your ssh keys so they can be use for code sync
- config.vm.synced_folder "ansible/", "/etc/ansible"
- config.vm.synced_folder "~/.ssh", "/home/vagrant/.ssh.new"
- # Grab the latest OS and install and configure Ansible
- config.vm.provision "shell", inline: "/bin/bash /etc/ansible/setup.sh"
- config.vm.box = "ubuntu/trusty64"
- config.vm.hostname = "ansible-devbox"
- config.vm.provider "virtualbox" do |v|
- v.memory = 1024
- v.cpus = 1
- end
- # Re-download all of the modules in the requirements.yml file
- # *DANGER* do not store anything in the roles directory
- config.vm.provision "shell", inline: "cd /etc/ansible && rm -rf roles/* && ansible-galaxy install --roles-path roles -r requirements.yml"
- config.vm.provision "shell", inline: "/usr/local/bin/ansible-playbook /etc/ansible/playbook.yml"
- end
|