-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVagrantfile
More file actions
31 lines (22 loc) · 790 Bytes
/
Copy pathVagrantfile
File metadata and controls
31 lines (22 loc) · 790 Bytes
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
require 'json'
require File.expand_path(File.dirname(__FILE__) + '/scripts/config.rb')
confDir = File.expand_path(File.dirname(__FILE__))
configPath = confDir + "/config.json"
Vagrant.configure("2") do |config|
if File.exist? configPath then
settings = JSON::parse(File.read(configPath))
else
abort "config settings file not found in #{confDir}"
end
Config.set(config, settings)
if Vagrant.has_plugin?("vagrant-vbguest")
config.vbguest.auto_update = false
end
if Vagrant.has_plugin?('vagrant-hostmanager')
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
config.hostmanager.aliases = settings['sites'].map { |site| site['map'] }
end
end