This repository has been archived by the owner on Feb 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathVagrantfile
57 lines (49 loc) · 2.54 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
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'virtualbox'
Vagrant.configure("2") do |config|
config.vm.define "vrhel6" do |rhel6|
rhel6.vm.box = "samdoran/rhel6"
rhel6.vm.hostname = "vrhel6"
rhel6.vm.network "forwarded_port", guest: 9443, host: 8750
rhel6.vm.network "private_network", ip: "10.0.42.6", virtualbox__intnet: true
rhel6.vm.synced_folder "./test/rhel6/", "/qpc_tools", :mount_options => ["dmode=777", "fmode=777"]
end
config.vm.define "vrhel7" do |rhel7|
rhel7.vm.box = "generic/rhel7"
rhel7.vm.hostname = "vrhel7"
rhel7.vm.network "forwarded_port", guest: 9443, host: 8751
rhel7.vm.network "private_network", ip: "10.0.42.7", virtualbox__intnet: true
rhel7.vm.synced_folder "./test/rhel7/", "/qpc_tools", :mount_options => ["dmode=777", "fmode=777"]
end
config.vm.define "vrhel8" do |rhel8|
rhel8.vm.box = "generic/rhel8"
rhel8.vm.hostname = "vrhel8"
rhel8.vm.network "forwarded_port", guest: 9443, host: 8752, host_ip:"127.0.0.1"
rhel8.vm.network "private_network", ip: "10.0.42.8", virtualbox__intnet: true
rhel8.vm.synced_folder "./test/rhel8/", "/qpc_tools", :mount_options => ["dmode=777", "fmode=777"]
end
config.vm.define "vcentos6" do |centos6|
centos6.vm.box = "geerlingguy/centos6"
centos6.vm.hostname = "vcentos6"
centos6.vm.network "forwarded_port", guest: 9443, host: 8753
centos6.vm.network "private_network", ip: "10.0.42.106", virtualbox__intnet: true
centos6.vm.synced_folder "./test/centos6/", "/qpc_tools", :mount_options => ["dmode=777", "fmode=777"]
end
config.vm.define "vcentos7" do |centos7|
centos7.vm.box = "geerlingguy/centos7"
centos7.vm.hostname = "vcentos7"
centos7.vm.network "forwarded_port", guest: 9443, host: 8754
centos7.vm.network "private_network", ip: "10.0.42.107", virtualbox__intnet: true
centos7.vm.synced_folder "./test/centos7/", "/qpc_tools", :mount_options => ["dmode=777", "fmode=777"]
end
config.vm.define "vcentos8" do |centos8|
centos8.vm.box = "geerlingguy/centos8"
centos8.vm.hostname = "vcentos8"
centos8.vm.network "forwarded_port", guest: 9443, host: 8755
centos8.vm.network "private_network", ip: "10.0.42.108", virtualbox__intnet: true
centos8.vm.synced_folder "./test/centos8/", "/qpc_tools", :mount_options => ["dmode=777", "fmode=777"]
end
config.vm.provision "shell", inline: <<-EOF
sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
systemctl restart sshd.service || service sshd restart # rhel6/centos6 don't have systemctl
EOF
end