-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_Example_Vagrantfile
More file actions
54 lines (43 loc) · 1.79 KB
/
_Example_Vagrantfile
File metadata and controls
54 lines (43 loc) · 1.79 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.require_version ">= 2.2.6"
Vagrant.configure(2) do |config|
# disable virtualbox guest additions
if Vagrant.has_plugin?("vagrant-vbguest")
config.vbguest.auto_update = false
end
# windows set proxy vars
# $proxy='http://proxyserver:port'
# $ENV:HTTP_PROXY=$proxy
# $ENV:HTTPS_PROXY=$proxy
# $ENV:http_proxy=$proxy
# $ENV:https_proxy=$proxy
# $ENV:no_proxy='127.0.0.0/8,localhost,192.168.0.0/16'
## netsh winhttp set proxy "proxyserver:port"
# set proxy on vm if needed
if ENV['http_proxy'] != nil and ENV['https_proxy'] != nil and ENV['no_proxy'] != nil
if not Vagrant.has_plugin?('vagrant-proxyconf')
system 'vagrant plugin install vagrant-proxyconf'
raise 'vagrant-proxyconf was installed but it requires to execute again'
end
config.proxy.http = ENV['http_proxy']
config.proxy.https = ENV['https_proxy']
config.proxy.no_proxy = ENV['no_proxy']
end
config.vm.box = "ubuntu/jammy64"
config.vm.box_check_update = false
config.vm.hostname = 'general'
# config.vm.network :private_network, ip: '192.168.100.50'
# Create a forwarded port mapping.
# Allows access to a specific port in the vagrant VM from a port on the host machine.
# Example below: accessing "localhost:8800" will access port 8000 on the guest machine.
config.vm.network "forwarded_port", guest: 8000, host:8800
config.vm.provider "virtualbox" do |vb|
vb.memory = 1024*4
vb.cpus=2
end
# Copy a file
config.vm.provision "shell", inline: "wget https://raw.githubusercontent.com/dlux/InstallScripts/master/.bash_login"
# Run a shell script
#config.vm.provision "shell", path: "https://raw.githubusercontent.com/dlux/InstallScripts/master/install_docker.sh" #, args: "-x http://proxy-server:port"
end