-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
44 lines (36 loc) · 1.09 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
# Caracal Site - Development Environment
#
# Copyright © 2017. Way2CU. All Rights Reserved.
# Author: Mladen Mijatov
Vagrant.configure('2') do |config|
config.vm.box = 'debian/contrib-jessie64'
# customize virtual machine
config.vm.provider 'virtualbox' do |vm|
# name our machine for easier management
path = File.dirname(__FILE__)
name = File.basename(path)
if name == 'Template'
vm.name = File.basename(File.dirname(path))
else
vm.name = name
end
# configure virtualization options
vm.customize [ 'modifyvm', :id, '--paravirtprovider', 'kvm' ]
# configure virtual machine resources
vm.memory = 256
vm.cpus = 1
end
# install web server and required components
config.vm.provision :ansible do |ansible|
ansible.compatibility_mode = '2.0'
ansible.playbook = 'provision/playbook.yml'
ansible.limit = 'all'
ansible.groups = {
'all' => ['caracal']
}
end
# configure synchronized folder to specific user
config.vm.synced_folder 'site', '/vagrant', owner: 'www-data', group: 'www-data'
# configure network
config.vm.network :forwarded_port, host:8080, guest:80
end