-
Notifications
You must be signed in to change notification settings - Fork 3
/
Vagrantfile-singlebox
97 lines (68 loc) · 3.39 KB
/
Vagrantfile-singlebox
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# -*- mode: ruby -*-
# vi: set ft=ruby :
box_name = 'windows2008r2'
network_wifi = 'en0: Wi-Fi (AirPort)'
network_wired = 'en1: Thunderbolt Ethernet'
network = network_wifi
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
# VAGRANTFILE_API_VERSION = "2"
Vagrant.configure("2") do |config|
config.vm.define 'wsus_server',primary: true do |config|
# config.berkshelf.enabled = true
# config.berkshelf.berksfile_path = "cookbooks/wsus_wrapper/Berksfile"
# Chef-Zero plugin configuration
# config.chef_zero.enabled = true
# Granular config
# config.chef_zero.nodes = "../foobar/nodes"
# config.chef_zero.environments = "../foobar/environments/baz.json"
# config.chef_zero.data_bags = "../foobar/data_bags"
# config.chef_zero.roles = "../foobar/roles/*.json"
# config.chef_zero.cookbooks = "spec/fixtures/cookbooks"
# Alternatively, you can use chef_repo_path and it will attempt to intelligently find the appropriate sub directories:
# config.chef_zero.chef_repo_path = "../cookbooks/"
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = box_name
# The url from where the 'config.vm.box' box will be fetched
# config.vm.box_url = box_url
#Set WinRM Timeout in seconds (Default 30)
# config.winrm.timeout = 1800
# New veature in vagrant 1.6. Makes windows much easier.
config.vm.communicator = "winrm"
# Port forward WinRM and RDP
# config.vm.network :forwarded_port, { :guest=>3389, :host=>3389, :id=>"rdp"}#, :auto_correct=>true }
# config.vm.network :forwarded_port, { :guest=>5985, :host=>5985, :id=>"winrm"}#, :auto_correct=>true }
# config.vm.network :private_network, ip: "192.168.33.10" # needed for Consultants/Contractors to spin up vagrant on VPN.
# Share an additional folder to the guest VM. The first argument is
config.vm.synced_folder ".", "/vagrant", disabled: true
# config.vm.synced_folder "../", "c:/cookbooks_path"
# config.vm.synced_folder '~/Documents/ISO_BOX_etc/binaries', "c:/local_binaries"# if FileTest::directory?('~/Documents/Projects/binaries/wsus')
config.vm.provider :virtualbox do |p|
p.gui = true
# adding nat flag to make it work over VPN (may only be needed for consultants). Works in conjunction with private_network above.
p.customize ["modifyvm", :id, "--memory", "1500", "--clipboard", "bidirectional", "--natdnshostresolver1", "on"]
end
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# config.vm.guest = :windows
# config.windows.halt_timeout = 25
# config.winrm.username = "vagrant"
# config.winrm.password = "vagrant"
# config.winrm.max_tries = 10
## Enable provisioning with chef solo
config.vm.provision :chef_solo do |chef|
# chef.cookbooks_path = "../"
chef.log_level = :debug
# chef.add_recipe "chef-dev-workstation::windows_setup"
# chef.add_recipe "wsus::server"
chef.add_recipe "wsus_wrapper"
# chef.run_list = ["recipe[ge_splunk]"]
end
# Enable provisioning with chef server, specifying the chef server URL,
# config.omnibus.chef_version = :latest
# config.omnibus.chef_version = '11.8.0'
end
# config.vm.define 'wsus_client' do |config|
# end
# config.vm.define 'wsus_ad' do |config|
# end
end