-
-
Notifications
You must be signed in to change notification settings - Fork 113
/
Vagrantfile
142 lines (136 loc) · 5.15 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
Vagrant.configure("2") do |config|
config.vbguest.installer_options = { allow_kernel_upgrade: false }
config.vbguest.auto_update = false
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--uart1", "0x3F8", "4"]
vb.customize ["modifyvm", :id, "--uartmode1", "disconnected"]
end
config.vm.define "bullseye_vlan" do |bullseye_vlan|
bullseye_vlan.vm.box = "debian/bullseye64"
bullseye_vlan.ssh.insert_key = true
bullseye_vlan.ssh.key_type = "ed25519"
bullseye_vlan.vm.hostname = "bullseye-vlan"
bullseye_vlan.vm.boot_timeout = 600
bullseye_vlan.vm.provision "shell",
inline: "ip link set dev eth0 down; ip link set eth0 name eth0.101; ip link set dev eth0.101 up; dhclient -r eth0.101; dhclient eth0.101"
bullseye_vlan.vm.provision "shell",
inline: "apt-get update && apt-get -y install curl python3-pip && python3 -m pip install ansible"
bullseye_vlan.vm.provision "ansible" do |a|
a.verbose = "v"
a.limit = "all"
a.playbook = "tests/test.yml"
a.extra_vars = {
"ansible_become_pass" => "vagrant",
"ansible_python_interpreter" => "/usr/bin/python3",
"sshd_admin_net" => ["0.0.0.0/0"],
"sshd_allow_groups" => ["vagrant", "sudo", "debian", "ubuntu"],
"system_upgrade" => "false",
"manage_aide" => "false",
}
end
end
config.vm.define "bullseye" do |bullseye|
bullseye.vm.box = "debian/bullseye64"
bullseye.ssh.insert_key = true
bullseye.ssh.key_type = "ed25519"
bullseye.vm.hostname = "bullseye"
bullseye.vm.boot_timeout = 600
bullseye.vm.provision "shell",
inline: "apt-get update && apt-get -y install curl python3-pip && python3 -m pip install ansible"
bullseye.vm.provision "ansible" do |a|
a.verbose = "v"
a.limit = "all"
a.playbook = "tests/test.yml"
a.extra_vars = {
"ansible_become_pass" => "vagrant",
"ansible_python_interpreter" => "/usr/bin/python3",
"sshd_admin_net" => ["0.0.0.0/0"],
"sshd_allow_groups" => ["vagrant", "sudo", "debian", "ubuntu"],
"system_upgrade" => "false",
}
end
end
config.vm.define "bookworm" do |bookworm|
bookworm.vm.box = "debian/bookworm64"
bookworm.ssh.insert_key = true
bookworm.ssh.key_type = "ed25519"
bookworm.vm.hostname = "bookworm"
bookworm.vm.boot_timeout = 600
bookworm.vm.provision "shell",
# Remove EXTERNALLY-MANAGED to ignore PEP 668
inline: "apt-get update && apt-get -y install python3-pip curl && rm -rf /usr/lib/python3.11/EXTERNALLY-MANAGED && python3 -m pip install ansible"
bookworm.vm.provision "ansible" do |a|
a.verbose = "v"
a.limit = "all"
a.playbook = "tests/test.yml"
a.extra_vars = {
"ansible_become_pass" => "vagrant",
"ansible_python_interpreter" => "/usr/bin/python3",
"sshd_admin_net" => ["0.0.0.0/0"],
"sshd_allow_groups" => ["vagrant", "sudo", "debian", "ubuntu"],
"system_upgrade" => "false",
}
end
end
config.vm.define "jammy" do |jammy|
jammy.vm.box = "bento/ubuntu-22.04"
jammy.ssh.insert_key = true
jammy.ssh.key_type = "ed25519"
jammy.vm.hostname = "jammy"
jammy.vm.boot_timeout = 600
jammy.vm.provision "shell",
inline: "apt-get update && apt-get -y install curl python3-pip && python3 -m pip install ansible"
jammy.vm.provision "ansible" do |a|
a.verbose = "v"
a.limit = "all"
a.playbook = "tests/test.yml"
a.extra_vars = {
"sshd_admin_net" => ["0.0.0.0/0"],
"sshd_allow_groups" => ["vagrant", "sudo", "ubuntu"],
"ansible_python_interpreter" => "/usr/bin/python3",
}
end
end
config.vm.define "noble" do |noble|
noble.vm.box = "bento/ubuntu-24.04"
noble.ssh.insert_key = true
noble.ssh.key_type = "ed25519"
noble.vm.hostname = "noble"
noble.vm.boot_timeout = 600
noble.vm.provision "shell",
# Ignore PEP 668
inline: "apt-get update && apt-get -y install python3-pip curl && python3 -m pip install --break-system-packages ansible"
noble.vm.provision "ansible" do |a|
a.verbose = "v"
a.limit = "all"
a.playbook = "tests/test.yml"
a.extra_vars = {
"sshd_admin_net" => ["0.0.0.0/0"],
"sshd_allow_groups" => ["vagrant", "sudo", "ubuntu"],
"ansible_python_interpreter" => "/usr/bin/python3",
}
end
end
config.vm.define "almalinux" do |almalinux|
almalinux.vm.box = "almalinux/9"
almalinux.ssh.insert_key = true
almalinux.ssh.key_type = "ed25519"
almalinux.vm.provider "virtualbox" do |c|
c.default_nic_type = "82543GC"
c.memory = 2048
end
almalinux.vm.hostname = "almalinux"
almalinux.vm.provision "shell",
inline: "dnf clean all && dnf install -y curl python3-pip && python3 -m pip install -U pip && python3 -m pip install ansible"
almalinux.vm.provision "ansible" do |a|
a.verbose = "v"
a.limit = "all"
a.playbook = "tests/test.yml"
a.extra_vars = {
"sshd_admin_net" => ["0.0.0.0/0"],
"sshd_allow_groups" => ["vagrant", "sudo"],
"ansible_python_interpreter" => "/usr/bin/python3",
}
end
end
end