-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
46 lines (39 loc) · 1.19 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# -*- mode: ruby -*-
# vi: set ft=ruby :
def provision(config, from, to)
require 'find'
from.each { |dir|
fulldir = File.expand_path(File.dirname(__FILE__)) + '/' + dir
if File.directory?(fulldir)
Dir.chdir(fulldir) do
Find.find('.') do |p|
if !File.directory?(p)
config.vm.provision 'file', run: 'always',
source: fulldir + '/' + p,
destination: to + '/' + p
end
end
end
end
}
end
Vagrant.configure('2') do |config|
config.ssh.forward_agent = true
config.vm.box = 'maverickwoo/xubuntu64-trusty'
config.vm.provider 'virtualbox' do |vb|
vb.gui = true
vb.cpus = 4
vb.memory = (ENV['M'] || '6').to_i * 1024
vb.customize [
'setextradata', :id,
'VBoxInternal2/SharedFoldersEnableSymlinksCreate/vmshare', 1
]
end
{
'/Users/maverick/vmshare' => '/media/sf_vmshare',
'/Users/maverick/Programming/maverickwoo/qira-docker' => '/media/qira-docker'
}.each { |h, g|
config.vm.synced_folder h, g, owner: ENV['USER'], mount_options: ['exec']
}
provision config, ['provision/public/root', 'provision/private/root'], ''
end