-
-
Notifications
You must be signed in to change notification settings - Fork 992
Expand file tree
/
Copy pathVagrantfile
More file actions
25 lines (19 loc) · 740 Bytes
/
Vagrantfile
File metadata and controls
25 lines (19 loc) · 740 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
require 'json'
require 'yaml'
VAGRANTFILE_API_VERSION ||= "2"
confDir = $confDir ||= File.expand_path("vendor/svpernova09/homestead", File.dirname(__FILE__))
homesteadYamlPath = "bootstrap.yaml"
afterScriptPath = "after.sh"
aliasesPath = "aliases"
require File.expand_path(confDir + '/scripts/homestead.rb')
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
if File.exist? aliasesPath then
config.vm.provision "file", source: aliasesPath, destination: "~/.bash_aliases"
end
if File.exist? homesteadYamlPath then
Homestead.configure(config, YAML::load(File.read(homesteadYamlPath)))
end
if File.exist? afterScriptPath then
config.vm.provision "shell", path: afterScriptPath
end
end