forked from sous-chefs/openvpn
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVagrantfile
54 lines (44 loc) · 1.37 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# -*- mode: ruby -*-
# vi: set ft=ruby :
# http://docs.vagrantup.com/v2/multi-machine/
Vagrant.configure('2') do |config|
config.vm.box = 'ubuntu-14.04'
config.vm.box_url = "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_#{config.vm.box}_chef-provisionerless.box"
config.omnibus.chef_version = 'latest'
config.berkshelf.enabled = true
config.vm.network 'private_network', type: 'dhcp'
config.vm.define 'server', primary: true do |server|
server.vm.hostname = 'openvpn-server'
server.vm.network 'private_network', ip: '192.168.50.4'
# server.vm.provider 'virtualbox' do |v|
# v.gui = true
# end
server.vm.provision :chef_solo do |chef|
chef.cookbooks_path = File.expand_path('~/.berkshelf/cookbooks')
# chef.log_level = :debug
chef.json = {
}
chef.run_list = [
'recipe[openvpn::server]'
]
end
end
config.vm.define 'client' do |client|
client.vm.hostname = 'openvpn-client'
# client.vm.provider 'virtualbox' do |v|
# v.gui = true
# end
client.vm.provision :chef_solo do |chef|
chef.cookbooks_path = File.expand_path('~/.berkshelf/cookbooks')
# chef.log_level = :debug
chef.json = {
'openvpn' => {
'gateway' => '192.168.50.4'
}
}
chef.run_list = [
'recipe[openvpn::client]'
]
end
end
end