-
Notifications
You must be signed in to change notification settings - Fork 3
/
Vagrantfile
48 lines (38 loc) · 1.29 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
47
48
# options for Vagrant provisioning; do NOT commit personal changes to these
provisioning = {
# if enabled, the base Ubuntu box will be used and Ansible will provision it;
# when disabled, the custom Korobi box will be used and no provisioning will
# happen; this is useful it you find yourself using `vagrant destroy -f;
# vagrant up` very often, or if you're on Windows, which doesn't support
# Ansible
enabled: ENV.fetch('KOROBI_PROVISIONING', 'true') == 'true',
# if true, Ansible's verbose mode (level 'vv') will be used; does nothing if
# provisioning is disabled
debug: false
}
Vagrant.configure(2) do |config|
if provisioning[:enabled]
config.vm.box = 'ubuntu/trusty64'
else
config.vm.box = 'bionicrm/korobi-web'
end
config.vm.hostname = 'korobi'
config.vm.network :private_network, ip: '10.0.5.6'
config.vm.synced_folder '.', '/home/vagrant/site',
id: 'vagrant-root',
owner: 'vagrant',
group: 'www-data',
mount_options: ['dmode=775,fmode=664']
config.vm.provider :virtualbox do |v|
v.name = 'korobi_web_vagrant'
v.memory = 1024
end
if provisioning[:enabled]
config.vm.provision :ansible do |ansible|
if provisioning[:debug]
ansible.verbose = 'vv'
end
ansible.playbook = 'playbook.yml'
end
end
end