forked from ansible-community/ansible-bender
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Vagrantfile
48 lines (43 loc) · 1.18 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
with_tests = ENV["WITH_TESTS"] || "no"
if with_tests == "yes"
config.vm.define "f30" do |f30|
f30.vm.box = "fedora/30-cloud-base"
end
end
config.vm.define "f31" do |f31|
f31.vm.box = "fedora/31-cloud-base"
end
config.vm.provider "libvirt" do |vb|
vb.memory = "1024"
end
config.vm.provision "ansible" do |a|
a.playbook = "contrib/pre-setup.yml"
a.raw_arguments = [
"-vv",
"-e", "ansible_python_interpreter=/usr/bin/python3",
"-e", "project_dir=/vagrant",
"-e", "with_tests=#{with_tests}",
"--become"
]
end
config.vm.provision "shell", :inline => "grep unified_cgroup_hierarchy /proc/cmdline || reboot"
config.vm.provision "ansible" do |a|
a.playbook = "contrib/post-setup.yml"
a.raw_arguments = [
"-vv",
"-e", "ansible_python_interpreter=/usr/bin/python3",
"-e", "project_dir=/vagrant",
"-e", "with_tests=#{with_tests}",
"--become"
]
end
if with_tests == "yes"
config.vm.provision "shell" do |s|
s.name = "test-script"
s.inline = "cd /vagrant && sudo make check"
end
end
end