forked from ThoughtWorksInc/transervicos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
29 lines (24 loc) · 881 Bytes
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
new_plugin_installed = false
%w(
vagrant-cachier
).each do |plugin|
next if Vagrant.has_plugin?(plugin)
puts "Missing plugin #{plugin}, installing..."
`vagrant plugin install #{plugin}`
new_plugin_installed = true
end
exec "vagrant #{ARGV.join(' ')}" if new_plugin_installed
BASE_PATH = '/vagrant/transervicos'
VAGRANTFILE_API_VERSION = '2'
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = 'hashicorp/precise32'
config.vm.provision 'ansible' do |ansible|
ansible.playbook = 'provisioning/playbook.yml'
ansible.sudo = true
ansible.verbose = 'vv'
end
config.vm.network :forwarded_port, guest: 8080, host: 8000, auto_correct: true
config.vm.network :forwarded_port, guest: 9876, host: 9876, auto_correct: true
config.vm.synced_folder '.', BASE_PATH
config.cache.scope = :box if Vagrant.has_plugin?('vagrant-cachier')
end