-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathVagrantfile
63 lines (48 loc) · 1.75 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
Vagrant.configure("2") do |config|
config.vm.define "ansible_main" do |main|
main.vm.box = "archlinux/archlinux"
main.vm.network "public_network", use_dhcp_assigned_default_route: true#, bridge: "wlp2s0"
main.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
vb.name = "ansible_main"
end
end
config.vm.define "arch" do |arch|
arch.vm.box = "archlinux/archlinux"
arch.disksize.size = "30GB"
arch.vm.network "public_network", use_dhcp_assigned_default_route: true#, bridge: "wlp2s0"
arch.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
end
arch.vm.provision "shell", inline: <<-SHELL
sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
systemctl restart sshd
pacman -Syu --noconfirm
SHELL
end
config.vm.define "ubuntu" do |ubuntu|
ubuntu.vm.box = "ubuntu/focal64"
ubuntu.vm.network "public_network", use_dhcp_assigned_default_route: true#, bridge: "wlp2s0"
ubuntu.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
end
ubuntu.vm.provision "shell", inline: <<-SHELL
sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
systemctl restart sshd
apt-get update
apt-get upgrade -y
SHELL
end
config.vm.define "centos" do |centos|
centos.vm.box = "centos/stream8"
centos.vm.network "public_network", use_dhcp_assigned_default_route: true#, bridge: "wlp2s0"
centos.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
end
centos.vm.provision "shell", inline: <<-SHELL
sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
systemctl restart sshd
dnf update -y
SHELL
end
end