-
Notifications
You must be signed in to change notification settings - Fork 9
/
Vagrantfile
37 lines (31 loc) · 1.47 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
$NFS = ENV.has_key?('VM_NFS') ? ENV['VM_NFS'] != "false" : true
Vagrant.configure("2") do |config|
# Configure the box to use
config.vm.box = 'debian/jessie64'
# Configure the network interfaces
config.vm.network :private_network, ip: "192.168.31.3"
config.vm.network :forwarded_port, guest: 80, host: 8070
config.vm.network :forwarded_port, guest: 8081, host: 8071
config.vm.network :forwarded_port, guest: 3306, host: 3306
config.vm.network :forwarded_port, guest: 27017, host: 27017
# Configure shared folders
config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", nfs: $NFS
config.vm.synced_folder "./wordpress", "/var/www/nuitdebout", id: "application", nfs: $NFS
config.vm.synced_folder "./theme", "/var/www/nuitdebout/wp-content/themes/nuitdebout",
id: "theme", nfs: $NFS
# TODO: Fix the nginx log synchronization
# config.vm.synced_folder "./logs", "/var/log/nginx", id: "logs", nfs: $NFS
# Configure VirtualBox environment
config.vm.provider :virtualbox do |v|
v.name = (0...8).map { (65 + rand(26)).chr }.join
v.customize [ "modifyvm", :id, "--memory", 512 ]
end
config.vm.provision :hosts do |provisioner|
provisioner.add_host '127.0.0.1', ['nuitdebout.dev']
end
# Provision the box
config.vm.provision :ansible do |ansible|
ansible.extra_vars = { ansible_ssh_user: 'vagrant' }
ansible.playbook = "ansible/site.yml"
end
end