-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVagrantfile
78 lines (69 loc) · 1.92 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# ENV['VAGRANT_DEFAULT_PROVIDER'] = 'libvirt'
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.define "vm1" do |vm1|
vm1.vm.box = "generic/ubuntu2004"
vm1.vm.hostname = "ubuntu20"
vm1.vm.network :public_network,
:dev => 'br0',
# :mode => "bridge",
:type => 'bridge',
:ip => "192.168.10.51"
vm1.vm.provider :libvirt do |conf|
conf.memory = 2048
conf.cpus = 2
# conf.nested = true
# conf.volume_cache = 'none'
end
end
config.vm.define "vm2" do |vm2|
# vm2.vm.box = "centos/8"
vm2.vm.box = "generic/centos8"
vm2.vm.hostname = "centos8"
vm2.vm.network :public_network,
:dev => 'br0',
:type => 'bridge',
:ip => "192.168.10.58"
vm2.vm.provider :libvirt do |conf|
conf.memory = 2048
conf.cpus = 1
end
end
# config.vm.define "vm3" do |vm3|
# vm3.vm.box = "generic/ubuntu1804"
# vm3.vm.hostname = "ubuntu18"
# vm3.vm.network :public_network,
# :dev => 'br0',
# :type => 'bridge',
# :ip => "192.168.10.52"
# vm3.vm.provider :libvirt do |conf|
# conf.memory = 1024
# conf.cpus = 1
# end
# end
# config.vm.define "vm4" do |vm4|
# # vm4.vm.box = "centos/7"
# vm4.vm.box = "generic/centos7"
# vm4.vm.hostname = "centos7"
# vm4.vm.network :public_network,
# :dev => 'br0',
# :type => 'bridge',
# :ip => "192.168.10.57"
# vm4.vm.provider :libvirt do |conf|
# conf.memory = 1024
# conf.cpus = 1
# end
# end
# config.vm.provider "libvirt"
config.vm.provision "file", source: "../../id_rsa.pub", destination: ".ssh/id_rsa_oleg.pub"
config.vm.provision "shell", inline: <<-SHELL
cat /home/vagrant/.ssh/id_rsa_oleg.pub >> /home/vagrant/.ssh/authorized_keys
SHELL
# config.provider :libvirt do |conf|
# conf.memory = 1024
# conf.cpus = 1
# end
end