forked from konstruktoid/ansible-role-hardening
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
93 lines (89 loc) · 3.09 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
Vagrant.configure("2") do |config|
config.vbguest.installer_options = { allow_kernel_upgrade: true }
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--uart1", "0x3F8", "4"]
vb.customize ["modifyvm", :id, "--uartmode1", "file", File::NULL]
end
config.vm.define "bullseye" do |bullseye|
bullseye.vm.box = "debian/bullseye64"
bullseye.ssh.insert_key = true
bullseye.vm.hostname = "bullseye"
bullseye.vm.boot_timeout = 600
bullseye.vbguest.auto_update = false
bullseye.vm.provision "shell",
inline: "apt-get update && apt-get -y install python3-pip && pip3 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" => "no",
"install_aide" => "false"
}
end
end
config.vm.define "focal" do |focal|
focal.vm.box = "ubuntu/focal64"
focal.ssh.insert_key = true
focal.vm.hostname = "focal"
focal.vm.boot_timeout = 600
focal.vm.provision "shell",
inline: "apt-get update && apt-get -y install python3-pip && pip3 install ansible"
focal.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",
"install_aide" => "false"
}
end
end
config.vm.define "jammy" do |jammy|
jammy.vm.box = "ubuntu/jammy64"
jammy.ssh.insert_key = true
jammy.vm.hostname = "jammy"
jammy.vm.boot_timeout = 600
jammy.vm.provision "shell",
inline: "apt-get update && apt-get -y install python3-pip && pip3 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",
"install_aide" => "false"
}
end
end
config.vm.define "almalinux" do |almalinux|
almalinux.vm.box = "almalinux/8"
almalinux.ssh.insert_key = true
almalinux.vbguest.auto_update = false
almalinux.vm.provider "virtualbox" do |c|
c.default_nic_type = "82543GC"
end
almalinux.vm.hostname = "almalinux"
almalinux.vm.provision "shell",
inline: "dnf clean all && dnf install -y python3-pip && pip3 install -U pip && pip3 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",
"install_aide" => "false"
}
end
end
end