forked from roots/trellis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
43 lines (36 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.require_version '>= 1.5.1'
Vagrant.configure('2') do |config|
config.vm.box = 'roots/bedrock'
config.vm.network :private_network, ip: '192.168.50.5'
config.vm.hostname = 'example.dev'
if !Vagrant.has_plugin? 'vagrant-hostsupdater'
puts 'vagrant-hostsupdater missing, please install the plugin:'
puts 'vagrant plugin install vagrant-hostsupdater'
else
# If you have multiple sites/hosts on a single VM
# uncomment and add them here
#config.hostsupdater.aliases = %w(site2.dev)
end
# adjust paths relative to Vagrantfile
config.vm.synced_folder '../example.dev', '/srv/www/example.dev/current', owner: 'vagrant', group: 'www-data', mount_options: ['dmode=776', 'fmode=775']
config.vm.provision :ansible do |ansible|
# adjust paths relative to Vagrantfile
ansible.playbook = './site.yml'
ansible.groups = {
'web' => ['default'],
'development' => ['default']
}
ansible.extra_vars = {
ansible_ssh_user: 'vagrant',
user: 'vagrant'
}
ansible.sudo = true
end
# Fix for slow external network connections
config.vm.provider :virtualbox do |vb|
vb.customize ['modifyvm', :id, '--natdnshostresolver1', 'on']
vb.customize ['modifyvm', :id, '--natdnsproxy1', 'on']
end
end