forked from openxc/vi-firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
40 lines (33 loc) · 1.24 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
34
35
36
37
38
39
40
# -*- coding: utf-8 -*-
# -*- 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|
# For a complete reference, please see the online documentation at
# vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "ubuntu/xenial64"
# Check for proxy enviroment variable and set it
if ENV['HTTP_PROXY'] || ENV['HTTPS_PROXY']
if Vagrant.has_plugin?("vagrant-proxyconf")
if ENV['HTTP_PROXY']
config.proxy.http = ENV['HTTP_PROXY']
config.apt_proxy.http = ENV['HTTP_PROXY']
end
if ENV['HTTPS_PROXY']
config.proxy.https = ENV['HTTPS_PROXY']
config.apt_proxy.https = ENV['HTTP_PROXY']
end
if ENV['NO_PROXY']
config.proxy.no_proxy = ENV['NO_PROXY']
end
else
abort("ERROR, vagrant-proxyconf not installed run ‘vagrant plugin install vagrant-proxyconf’ to install it")
end
end
config.vm.provision "shell", privileged: false, keep_color: true do |s|
s.inline = "ln -fs /vagrant vi-firmware;"
s.inline += "VAGRANT=1 vi-firmware/script/bootstrap.sh"
end
end