-
Notifications
You must be signed in to change notification settings - Fork 39
/
Vagrantfile
109 lines (98 loc) · 4.1 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
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = '2'
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# => vagrant plugin install vagrant-proxyconf
if Vagrant.has_plugin?('vagrant-proxyconf')
has_proxy = false
if ENV.has_key?('http_proxy') and !ENV['http_proxy'].empty?
config.proxy.http = ENV['http_proxy']
has_proxy = true
end
if ENV.has_key?('https_proxy') and !ENV['https_proxy'].empty?
config.proxy.https = ENV['https_proxy']
has_proxy = true
end
if has_proxy
config.proxy.no_proxy = 'localhost,127.0.0.1'
end
end
# => vagrant plugin install vagrant-cachier
if Vagrant.has_plugin?("vagrant-cachier")
# Configure cached packages to be shared between instances of the same base box.
# More info on http://fgrehm.viewdocs.io/vagrant-cachier/usage
config.cache.scope = :box
# OPTIONAL: If you are using VirtualBox, you might want to use that to enable
# NFS for shared folders. This is also very useful for vagrant-libvirt if you
# want bi-directional sync
config.cache.synced_folder_opts = {
type: :nfs,
# The nolock option can be useful for an NFSv3 client that wants to avoid the
# NLM sideband protocol. Without this option, apt-get might hang if it tries
# to lock files needed for /var/cache/* operations. All of this can be avoided
# by using NFSv4 everywhere. Please note that the tcp option is not the default.
mount_options: ['rw', 'vers=3', 'tcp', 'nolock']
}
# For more information please check http://docs.vagrantup.com/v2/synced-folders/basic_usage.html
end
config.vm.network "private_network", type: "dhcp"
config.vm.synced_folder '.', '/etc/puppet/modules/one/'
config.vm.define 'centos-head' do |centos|
centos.vm.box = 'puppetlabs/centos-6.6-64-puppet'
config.vm.box_version = '1.0.1'
centos.vm.provision 'shell', inline: '/usr/bin/yum -y install epel-release'
centos.vm.provision 'shell', inline: 'puppet module install puppetlabs-stdlib'
centos.vm.provision 'shell', inline: 'puppet module install puppetlabs-inifile'
centos.vm.provision 'puppet' do |puppet|
puppet.manifests_path = 'manifests'
puppet.manifest_file = 'init.pp'
puppet.options = [
'--verbose',
"-e 'class { one: oned => true, sunstone => true, }'"
]
end
end
config.vm.define 'centos-node' do |centos|
centos.vm.box = 'puppetlabs/centos-6.6-64-puppet'
config.vm.box_version = '1.0.1'
centos.vm.provision 'shell', inline: '/usr/bin/yum -y install epel-release'
centos.vm.provision 'shell', inline: 'puppet module install puppetlabs-stdlib'
centos.vm.provision 'shell', inline: 'puppet module install puppetlabs-inifile'
centos.vm.provision 'puppet' do |puppet|
puppet.manifests_path = 'manifests'
puppet.manifest_file = 'init.pp'
puppet.options = [
'--verbose',
"-e 'class { one: }'"
]
end
end
config.vm.define 'debian-head' do |debian|
debian.vm.box = 'puppetlabs/debian-7.8-64-puppet'
debian.vm.provision 'shell', inline: 'puppet module install puppetlabs-stdlib'
debian.vm.provision 'shell', inline: 'puppet module install puppetlabs-inifile'
debian.vm.provision 'shell', inline: 'puppet module install puppetlabs-apt'
debian.vm.provision 'puppet' do |puppet|
puppet.manifests_path = 'manifests'
puppet.manifest_file = 'init.pp'
puppet.options = [
'--verbose',
"-e 'class { one: oned => true, sunstone => true, }'"
]
end
end
config.vm.define 'debian-node' do |debian|
debian.vm.box = 'puppetlabs/debian-7.8-64-puppet'
debian.vm.provision 'shell', inline: 'puppet module install puppetlabs-stdlib'
debian.vm.provision 'shell', inline: 'puppet module install puppetlabs-inifile'
debian.vm.provision 'shell', inline: 'puppet module install puppetlabs-apt'
debian.vm.provision 'puppet' do |puppet|
puppet.manifests_path = 'manifests'
puppet.manifest_file = 'init.pp'
puppet.options = [
'--verbose',
"-e 'class { one: }'"
]
end
end
end