3 |
3 |
4 require 'yaml' |
4 require 'yaml' |
5 |
5 |
6 custom_file_path = File.join(__dir__, (ENV['SYSCONFIG'] || 'custom.yaml')) |
6 custom_file_path = File.join(__dir__, (ENV['SYSCONFIG'] || 'custom.yaml')) |
7 |
7 |
8 context = File.exist?(custom_file_path)?YAML::load_file(custom_file_path):{} |
8 context = (File.exist?(custom_file_path)?YAML::load_file(custom_file_path):{}) || {} |
9 |
9 |
10 ROOT_PATH = context.fetch("root_path","../") |
10 ROOT_PATH = context.fetch("root_path","../") |
11 |
11 |
12 # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! |
12 # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! |
13 VAGRANTFILE_API_VERSION = "2" |
13 VAGRANTFILE_API_VERSION = "2" |
16 # All Vagrant configuration is done here. The most common configuration |
16 # All Vagrant configuration is done here. The most common configuration |
17 # options are documented and commented below. For a complete reference, |
17 # options are documented and commented below. For a complete reference, |
18 # please see the online documentation at vagrantup.com. |
18 # please see the online documentation at vagrantup.com. |
19 |
19 |
20 # Every Vagrant virtual environment requires a box to build off of. |
20 # Every Vagrant virtual environment requires a box to build off of. |
21 config.vm.box = "wheezy-73-x64" |
21 config.vm.box = context.fetch("vm_box","wheezy-73-x64") |
22 |
22 |
23 # The url from where the 'config.vm.box' box will be fetched if it |
23 # The url from where the 'config.vm.box' box will be fetched if it |
24 # doesn't already exist on the user's system. |
24 # doesn't already exist on the user's system. |
25 config.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/debian-73-x64-virtualbox-puppet.box" |
25 config.vm.box_url = context.fetch("vm_box_url","http://puppet-vagrant-boxes.puppetlabs.com/debian-73-x64-virtualbox-puppet.box") |
26 |
26 |
27 # Create a forwarded port mapping which allows access to a specific port |
27 # Create a forwarded port mapping which allows access to a specific port |
28 # within the machine from a port on the host machine. In the example below, |
28 # within the machine from a port on the host machine. In the example below, |
29 # accessing "localhost:8080" will access port 80 on the guest machine. |
29 # accessing "localhost:8080" will access port 80 on the guest machine. |
30 # config.vm.network :forwarded_port, guest: 80, host: 8080 |
30 # config.vm.network :forwarded_port, guest: 80, host: 8080 |