mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-12-25 06:27:49 +01:00
tests: support default value in vagrant boxes.
This commit is contained in:
parent
a1ce144e1c
commit
cefd372099
2 changed files with 10 additions and 36 deletions
9
tests/Vagrantfile
vendored
9
tests/Vagrantfile
vendored
|
@ -6,6 +6,7 @@
|
|||
require 'yaml'
|
||||
|
||||
machines = YAML.load_file(File.join(File.dirname(__FILE__), 'boxes.yml'))
|
||||
default = machines['defaults']
|
||||
|
||||
Vagrant.require_version '>= 2.0.0'
|
||||
|
||||
|
@ -33,9 +34,9 @@ Vagrant.configure("2") do |config|
|
|||
libvirt.driver = 'kvm'
|
||||
libvirt.default_prefix = 'aa-'
|
||||
libvirt.connect_via_ssh = false
|
||||
libvirt.storage_pool_name = 'default'
|
||||
libvirt.memory = instance['ram']
|
||||
libvirt.cpus = instance['cpu']
|
||||
libvirt.storage_pool_name = 'ssd'
|
||||
libvirt.memory = instance.fetch('ram', default['ram'])
|
||||
libvirt.cpus = instance.fetch('cpu', default['cpu'])
|
||||
libvirt.cpu_mode = 'host-passthrough'
|
||||
libvirt.machine_type = 'q35'
|
||||
libvirt.video_type = 'virtio'
|
||||
|
@ -51,7 +52,7 @@ Vagrant.configure("2") do |config|
|
|||
(1..2).each do
|
||||
libvirt.redirdev :type => "spicevmc"
|
||||
end
|
||||
if instance['uefi']
|
||||
if instance.fetch('uefi', default['uefi'])
|
||||
libvirt.loader = '/usr/share/edk2-ovmf/x64/OVMF_CODE.fd'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,70 +1,43 @@
|
|||
---
|
||||
|
||||
boxes:
|
||||
defaults:
|
||||
uefi: true
|
||||
ram: '6144'
|
||||
cpu: '6'
|
||||
|
||||
boxes:
|
||||
- name: arch-gnome
|
||||
box: aa-archlinux-gnome
|
||||
uefi: false
|
||||
ram: '6144'
|
||||
cpu: '6'
|
||||
|
||||
- name: arch-kde
|
||||
box: aa-archlinux-kde
|
||||
uefi: false
|
||||
ram: '6144'
|
||||
cpu: '6'
|
||||
|
||||
- name: arch-server
|
||||
box: aa-archlinux-server
|
||||
uefi: false
|
||||
ram: '6144'
|
||||
cpu: '6'
|
||||
|
||||
- name: ubuntu-desktop
|
||||
box: aa-ubuntu-desktop
|
||||
uefi: true
|
||||
ram: '6144'
|
||||
cpu: '6'
|
||||
|
||||
- name: ubuntu-desktop24
|
||||
box: aa-ubuntu-desktop24
|
||||
uefi: true
|
||||
ram: '6144'
|
||||
cpu: '6'
|
||||
|
||||
- name: ubuntu-server
|
||||
box: aa-ubuntu-server
|
||||
uefi: true
|
||||
ram: '6144'
|
||||
cpu: '6'
|
||||
|
||||
- name: ubuntu-server24
|
||||
box: aa-ubuntu-server24
|
||||
uefi: true
|
||||
ram: '6144'
|
||||
cpu: '6'
|
||||
|
||||
- name: debian-server
|
||||
box: aa-debian-server
|
||||
uefi: true
|
||||
ram: '6144'
|
||||
cpu: '6'
|
||||
|
||||
- name: debian-gnome
|
||||
box: aa-debian-gnome
|
||||
uefi: true
|
||||
ram: '6144'
|
||||
cpu: '6'
|
||||
|
||||
- name: debian-kde
|
||||
box: aa-debian-kde
|
||||
uefi: true
|
||||
ram: '6144'
|
||||
cpu: '6'
|
||||
|
||||
- name: opensuse-kde
|
||||
box: aa-opensuse-kde
|
||||
uefi: true
|
||||
ram: '6144'
|
||||
cpu: '6'
|
||||
|
||||
|
|
Loading…
Reference in a new issue