Instantly share code, notes, and snippets.

Embed
What would you like to do?
Petclinic sample vagrant file
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.network :private_network, ip: "192.168.0.254"
config.vm.network "forwarded_port", guest: 8080, host: 8080 # web app
config.vm.provider "virtualbox" do |v|
# 8 generous gigabytes of RAM
v.memory = 8192
# We are running headless
v.customize ["modifyvm", :id, "--vram", "10"]
end
# Use ansible as our provisioning tool, because ansible
# is pretty awesome
config.vm.provision "ansible" do |ansible|
ansible.playbook = "Ansible/playbook.yml"
ansible.inventory_path = "Ansible/hosts.ini"
ansible.limit = "vagrant"
end
# Sync the current directory with the host petclinic dir
config.vm.synced_folder ".", "/opt/petclinic"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment