forked from sutch/image-building-sandbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
33 lines (26 loc) · 1.05 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.hostmanager.manage_host = true
config.hostmanager.ignore_private_ip = false
config.hostmanager.include_offline = false # false indicates that offline hosts be removed from hosts file
config.hostmanager.ip_resolver = proc do |vm, resolving_vm|
if vm.id
`VBoxManage guestproperty get #{vm.id} "/VirtualBox/GuestInfo/Net/1/V4/IP"`.split()[1]
end
end
if Vagrant.has_plugin?("vagrant-cachier")
# Configure cached packages to be shared between instances of the same base box.
# More info on http://fgrehm.viewdocs.io/vagrant-cachier/usage
config.cache.scope = :box
end
config.vm.define "gitlab" do |node|
node.vm.box = "gitlab"
node.vm.box_url = "build/gitlab.virtualbox.box"
node.vm.hostname = 'gitlab.test'
node.vm.network "private_network", type: "dhcp"
node.vm.provision :hostmanager
end
end