-
Notifications
You must be signed in to change notification settings - Fork 16
/
Vagrantfile
81 lines (72 loc) · 3.5 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# vi: set tabstop=2 :
# vi: set shiftwidth=2 :
Vagrant.configure("2") do |config|
vms_debian = [
{ :name => "debian-stretch", :box => "debian/stretch64", :vars => { dbs_use_systemd: true } },
{ :name => "debian-stretch-sysvinit", :box => "debian/stretch64", :vars => { dbs_use_systemd: false } },
{ :name => "debian-buster", :box => "debian/buster64", :vars => { dbs_use_systemd: true } },
{ :name => "debian-buster-sysvinit", :box => "debian/buster64", :vars => { dbs_use_systemd: false } },
{ :name => "debian-bullseye", :box => "debian/bullseye64", :vars => { dbs_use_systemd: true } },
{ :name => "debian-bullseye-sysvinit", :box => "debian/bullseye64", :vars => { dbs_use_systemd: false } },
{ :name => "debian-bookworm", :box => "boxomatic/debian-12", :vars => { dbs_use_systemd: true } },
{ :name => "debian-bookworm-sysvinit", :box => "boxomatic/debian-12", :vars => { dbs_use_systemd: false } },
{ :name => "devuan-ascii", :box => "https://files.devuan.org/devuan_ascii/virtual/devuan_ascii_2.0.0_amd64_vagrant.box" },
{ :name => "raspbian-stretch", :box => "gvfoster/raspbian",:vars => { dbs_use_systemd: true } },
{ :name => "ubuntu-bionic", :box => "ubuntu/bionic64", :vars => { dbs_use_systemd: true } },
{ :name => "ubuntu-focal", :box => "ubuntu/focal64", :vars => { dbs_use_systemd: true } },
{ :name => "ubuntu-jammy", :box => "ubuntu/jammy64", :vars => { dbs_use_systemd: true } },
]
conts = [
{ :name => "docker-debian-stretch", :docker => "hanxhx/vagrant-ansible:debian9", :vars => {} },
{ :name => "docker-debian-buster", :docker => "hanxhx/vagrant-ansible:debian10", :vars => {} },
{ :name => "docker-debian-bullseye", :docker => "hanxhx/vagrant-ansible:debian11", :vars => {} },
{ :name => "docker-ubuntu-bionic", :docker => "hanxhx/vagrant-ansible:ubuntu18.04", :vars => {} },
{ :name => "docker-ubuntu-focal", :docker => "hanxhx/vagrant-ansible:ubuntu20.04", :vars => {} },
{ :name => "docker-ubuntu-jammy", :docker => "hanxhx/vagrant-ansible:ubuntu22.04", :vars => {} }
]
config.vm.network "private_network", type: "dhcp"
conts.each do |opts|
config.vm.define opts[:name] do |m|
m.vm.provider "docker" do |d|
d.image = opts[:docker]
d.remains_running = true
d.has_ssh = true
end
m.vm.provision "ansible" do |ansible|
ansible.playbook = "tests/test.yml"
ansible.verbose = 'vv'
ansible.become = true
ansible.extra_vars = opts[:vars]
ansible.raw_arguments = ["-D"]
ansible.compatibility_mode = "2.0"
end
end
end
vms_debian.each do |opts|
config.vm.define opts[:name] do |m|
if opts[:name].include? "devuan" or opts[:name].include? "ubuntu"
m.vm.provision "shell", inline: "apt-get update -qq && apt-get -y install python"
end
if opts[:name].include? "devuan"
m.vm.box_url = opts[:box]
m.vm.box = opts[:name]
else
m.vm.box = opts[:box]
end
m.vm.provider "virtualbox" do |v|
v.cpus = 1
v.memory = 512
end
m.vm.provision "ansible" do |ansible|
ansible.playbook = "tests/test.yml"
ansible.verbose = 'vv'
ansible.become = true
ansible.extra_vars = opts[:vars]
ansible.raw_arguments = ["-D"]
ansible.compatibility_mode = "2.0"
end
end
end
end