-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile.example
47 lines (37 loc) · 1.48 KB
/
Vagrantfile.example
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.require_version '>= 1.5.1'
# IP Address for the host only network, change it to anything you like
# but please keep it within the IPv4 private network range
ip_address = "192.168.50.5"
# The project name is base for directories
# Will also be the hostname for your project (e.g.: http://projectname.local)
project_name = "vagrant.dev"
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network :private_network, ip: ip_address
config.vm.hostname = project_name
# config.vbguest.auto_update = false
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
# config.vm.synced_folder "../../path/to/directory", "/srv/www/#{project_name}/current",
# owner: "deploy",
# group: "web"
# Provision using Ansible
config.vm.provision "ansible" do |ansible|
ansible.playbook = "./build.yml"
ansible.inventory_path = "./hosts/local"
ansible.limit = 'all'
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