-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
233 lines (215 loc) · 7.91 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# -*- mode: ruby -*-
# vi: set ft=ruby :
#
# Vagrantfile for vpn
Vagrant.configure("2") do |config|
config.vm.synced_folder '.', '/vagrant', disabled: true
config.ssh.insert_key = false
config.vm.boot_timeout = 120
config.vm.provider :virtualbox do |vb|
#vb.gui = true
vb.memory = '1024'
end
#
# provision on all machines to allow ssh w/o checking
#
config.vm.provision "shell", inline: <<-SHELLALL
echo "...disabling CheckHostIP..."
sed -i.orig -e "s/# CheckHostIP yes/CheckHostIP no/" /etc/ssh/ssh_config
sed -i -e "s/.*PermitRootLogin.*/PermitRootLogin yes/" /etc/ssh/ssh_config
SHELLALL
config.vm.define "a8" do |a8|
a8.vm.box = "almalinux/8"
a8.ssh.insert_key = false
a8.vm.network 'private_network', ip: '192.168.10.188'
a8.vm.hostname = 'a8'
# a8.vm.provision "shell", inline: <<-SHELL
# dnf config-manager --set-enabled powertools
# dnf makecache
# dnf install -y python3
# alternatives --set python /usr/bin/python3
# SHELL
a8.vm.provision "ansible" do |ansible|
ansible.compatibility_mode = "2.0"
ansible.playbook = "play-vagrant.yaml"
ansible.inventory_path = "./inventory_vagrant"
#ansible.vault_password_file = ".vault_pass.txt"
#ansible.verbose = "v"
end
end
config.vm.define "c7" do |c7|
c7.vm.box = "centos/7"
c7.ssh.insert_key = false
c7.vm.network 'private_network', ip: '192.168.10.107'
c7.vm.hostname = 'c7'
# c7.vm.provision "shell", inline: <<-SHELL
# yum install -y python libselinux-python iproute
# SHELL
c7.vm.provision "ansible" do |ansible|
ansible.compatibility_mode = "2.0"
ansible.playbook = "play-vagrant.yaml"
ansible.inventory_path = "./inventory_vagrant"
#ansible.vault_password_file = ".vault_pass.txt"
#ansible.verbose = "v"
end
end
# https://bugzilla.redhat.com/show_bug.cgi?id=1820925
config.vm.define "c8" do |c8|
c8.vm.box = "centos/8"
c8.ssh.insert_key = false
c8.vm.network 'private_network', ip: '192.168.10.108'
c8.vm.hostname = 'c8'
# c8.vm.provision "shell", inline: <<-SHELL
# dnf config-manager --set-enabled powertools
# dnf makecache
# dnf install -y python3
# alternatives --set python /usr/bin/python3
# SHELL
c8.vm.provision "ansible" do |ansible|
ansible.compatibility_mode = "2.0"
ansible.playbook = "play-vagrant.yaml"
ansible.inventory_path = "./inventory_vagrant"
#ansible.vault_password_file = ".vault_pass.txt"
#ansible.verbose = "v"
end
end
config.vm.define "r8" do |r8|
r8.vm.box = "rockylinux/8"
r8.ssh.insert_key = false
r8.vm.network 'private_network', ip: '192.168.10.189'
r8.vm.hostname = 'r8'
# r8.vm.provision "shell", inline: <<-SHELL
# dnf config-manager --set-enabled powertools
# dnf makecache
# dnf install -y python3
# alternatives --set python /usr/bin/python3
# SHELL
r8.vm.provision "ansible" do |ansible|
ansible.compatibility_mode = "2.0"
ansible.playbook = "play-vagrant.yaml"
ansible.inventory_path = "./inventory_vagrant"
#ansible.vault_password_file = ".vault_pass.txt"
#ansible.verbose = "v"
end
end
# https://stackoverflow.com/questions/56460494/apt-get-install-apt-transport-https-fails-in-docker
config.vm.define "d9" do |d9|
d9.vm.box = "bento/debian-9"
d9.ssh.insert_key = false
d9.vm.network 'private_network', ip: '192.168.10.209'
d9.vm.hostname = 'd9'
# d9.vm.provision "shell", inline: <<-SHELL
# apt-get install -y apt-transport-https
# SHELL
d9.vm.provision "ansible" do |ansible|
ansible.compatibility_mode = "2.0"
ansible.playbook = "play-vagrant.yaml"
ansible.inventory_path = "./inventory_vagrant"
#ansible.vault_password_file = ".vault_pass.txt"
#ansible.verbose = "v"
end
end
# don't use apt: update_cache=yes here because it won't work to trap
config.vm.define "d10" do |d10|
d10.vm.box = "bento/debian-10"
d10.ssh.insert_key = false
d10.vm.network 'private_network', ip: '192.168.10.210'
d10.vm.hostname = 'd10'
# d10.vm.provision "shell", inline: <<-SHELL
# apt-get install -y apt-transport-https
# SHELL
d10.vm.provision "ansible" do |ansible|
ansible.compatibility_mode = "2.0"
ansible.playbook = "play-vagrant.yaml"
ansible.inventory_path = "./inventory_vagrant"
#ansible.vault_password_file = ".vault_pass.txt"
#ansible.verbose = "v"
end
end
# 2021.06.13 mirrors seem to be OK now, removing alternate repos
# 2021.06.17 mirrors are slow with Torguard LA VPN; Seattle seems OK
# https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-32&arch=x86_64
config.vm.define "f32" do |f32|
f32.vm.box = "fedora/32-cloud-base"
f32.ssh.insert_key = false
f32.vm.network 'private_network', ip: '192.168.10.132'
f32.vm.hostname = 'f32'
f32.vm.provision "shell", inline: <<-SHELL
dnf config-manager --setopt=fastestmirror=True --save
dnf config-manager --add-repo https://dl.fedoraproject.org/pub/fedora/linux/releases/32/Everything/x86_64/os/
dnf config-manager --add-repo http://mirror.metrocast.net/fedora/linux/releases/32/Everything/x86_64/os/
dnf config-manager --add-repo http://mirrors.kernel.org/fedora/releases/32/Everything/x86_64/os/
dnf config-manager --add-repo https://sjc.edge.kernel.org/fedora-buffet/fedora/linux/releases/32/Everything/x86_64/os/
# dnf install -y python3
SHELL
f32.vm.provision "ansible" do |ansible|
ansible.compatibility_mode = "2.0"
ansible.playbook = "play-vagrant.yaml"
ansible.inventory_path = "./inventory_vagrant"
#ansible.vault_password_file = ".vault_pass.txt"
#ansible.verbose = "v"
end
end
config.vm.define "f33" do |f33|
f33.vm.box = "fedora/33-cloud-base"
f33.ssh.insert_key = false
f33.vm.network 'private_network', ip: '192.168.10.133'
f33.vm.hostname = 'f33'
# f33.vm.provision "shell", inline: <<-SHELL
# dnf install -y python3
# SHELL
f33.vm.provision "ansible" do |ansible|
ansible.compatibility_mode = "2.0"
ansible.playbook = "play-vagrant.yaml"
ansible.inventory_path = "./inventory_vagrant"
#ansible.vault_password_file = ".vault_pass.txt"
#ansible.verbose = "v"
end
end
config.vm.define "f34" do |f34|
f34.vm.box = "fedora/34-cloud-base"
f34.ssh.insert_key = false
f34.vm.network 'private_network', ip: '192.168.10.134'
f34.vm.hostname = 'f34'
# f34.vm.provision "shell", inline: <<-SHELL
# dnf install -y python3
# SHELL
f34.vm.provision "ansible" do |ansible|
ansible.compatibility_mode = "2.0"
ansible.playbook = "play-vagrant.yaml"
ansible.inventory_path = "./inventory_vagrant"
#ansible.vault_password_file = ".vault_pass.txt"
#ansible.verbose = "v"
end
end
config.vm.define "u18" do |u18|
u18.vm.box = "ubuntu/bionic64"
u18.vm.network 'private_network', ip: '192.168.10.118'
u18.vm.hostname = 'u18'
# u18.vm.provision "shell", inline: <<-SHELL
# apt-get -y install python3
# SHELL
u18.vm.provision "ansible" do |ansible|
ansible.compatibility_mode = "2.0"
ansible.playbook = "play-vagrant.yaml"
ansible.inventory_path = "./inventory_vagrant"
#ansible.vault_password_file = ".vault_pass.txt"
#ansible.verbose = "v"
end
end
config.vm.define "u20" do |u20|
u20.vm.box = "ubuntu/focal64"
u20.vm.network 'private_network', ip: '192.168.10.120'
u20.vm.hostname = 'u20'
# u20.vm.provision "shell", inline: <<-SHELL
# apt-get -y install python3
# SHELL
u20.vm.provision "ansible" do |ansible|
ansible.compatibility_mode = "2.0"
ansible.playbook = "play-vagrant.yaml"
ansible.inventory_path = "./inventory_vagrant"
#ansible.vault_password_file = ".vault_pass.txt"
#ansible.verbose = "v"
end
end
end