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'
|
require 'yaml'
|
||||||
|
|
||||||
machines = YAML.load_file(File.join(File.dirname(__FILE__), 'boxes.yml'))
|
machines = YAML.load_file(File.join(File.dirname(__FILE__), 'boxes.yml'))
|
||||||
|
default = machines['defaults']
|
||||||
|
|
||||||
Vagrant.require_version '>= 2.0.0'
|
Vagrant.require_version '>= 2.0.0'
|
||||||
|
|
||||||
|
@ -33,9 +34,9 @@ Vagrant.configure("2") do |config|
|
||||||
libvirt.driver = 'kvm'
|
libvirt.driver = 'kvm'
|
||||||
libvirt.default_prefix = 'aa-'
|
libvirt.default_prefix = 'aa-'
|
||||||
libvirt.connect_via_ssh = false
|
libvirt.connect_via_ssh = false
|
||||||
libvirt.storage_pool_name = 'default'
|
libvirt.storage_pool_name = 'ssd'
|
||||||
libvirt.memory = instance['ram']
|
libvirt.memory = instance.fetch('ram', default['ram'])
|
||||||
libvirt.cpus = instance['cpu']
|
libvirt.cpus = instance.fetch('cpu', default['cpu'])
|
||||||
libvirt.cpu_mode = 'host-passthrough'
|
libvirt.cpu_mode = 'host-passthrough'
|
||||||
libvirt.machine_type = 'q35'
|
libvirt.machine_type = 'q35'
|
||||||
libvirt.video_type = 'virtio'
|
libvirt.video_type = 'virtio'
|
||||||
|
@ -51,7 +52,7 @@ Vagrant.configure("2") do |config|
|
||||||
(1..2).each do
|
(1..2).each do
|
||||||
libvirt.redirdev :type => "spicevmc"
|
libvirt.redirdev :type => "spicevmc"
|
||||||
end
|
end
|
||||||
if instance['uefi']
|
if instance.fetch('uefi', default['uefi'])
|
||||||
libvirt.loader = '/usr/share/edk2-ovmf/x64/OVMF_CODE.fd'
|
libvirt.loader = '/usr/share/edk2-ovmf/x64/OVMF_CODE.fd'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,70 +1,43 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
boxes:
|
defaults:
|
||||||
|
uefi: true
|
||||||
|
ram: '6144'
|
||||||
|
cpu: '6'
|
||||||
|
|
||||||
|
boxes:
|
||||||
- name: arch-gnome
|
- name: arch-gnome
|
||||||
box: aa-archlinux-gnome
|
box: aa-archlinux-gnome
|
||||||
uefi: false
|
uefi: false
|
||||||
ram: '6144'
|
|
||||||
cpu: '6'
|
|
||||||
|
|
||||||
- name: arch-kde
|
- name: arch-kde
|
||||||
box: aa-archlinux-kde
|
box: aa-archlinux-kde
|
||||||
uefi: false
|
uefi: false
|
||||||
ram: '6144'
|
|
||||||
cpu: '6'
|
|
||||||
|
|
||||||
- name: arch-server
|
- name: arch-server
|
||||||
box: aa-archlinux-server
|
box: aa-archlinux-server
|
||||||
uefi: false
|
uefi: false
|
||||||
ram: '6144'
|
|
||||||
cpu: '6'
|
|
||||||
|
|
||||||
- name: ubuntu-desktop
|
- name: ubuntu-desktop
|
||||||
box: aa-ubuntu-desktop
|
box: aa-ubuntu-desktop
|
||||||
uefi: true
|
|
||||||
ram: '6144'
|
|
||||||
cpu: '6'
|
|
||||||
|
|
||||||
- name: ubuntu-desktop24
|
- name: ubuntu-desktop24
|
||||||
box: aa-ubuntu-desktop24
|
box: aa-ubuntu-desktop24
|
||||||
uefi: true
|
|
||||||
ram: '6144'
|
|
||||||
cpu: '6'
|
|
||||||
|
|
||||||
- name: ubuntu-server
|
- name: ubuntu-server
|
||||||
box: aa-ubuntu-server
|
box: aa-ubuntu-server
|
||||||
uefi: true
|
|
||||||
ram: '6144'
|
|
||||||
cpu: '6'
|
|
||||||
|
|
||||||
- name: ubuntu-server24
|
- name: ubuntu-server24
|
||||||
box: aa-ubuntu-server24
|
box: aa-ubuntu-server24
|
||||||
uefi: true
|
|
||||||
ram: '6144'
|
|
||||||
cpu: '6'
|
|
||||||
|
|
||||||
- name: debian-server
|
- name: debian-server
|
||||||
box: aa-debian-server
|
box: aa-debian-server
|
||||||
uefi: true
|
|
||||||
ram: '6144'
|
|
||||||
cpu: '6'
|
|
||||||
|
|
||||||
- name: debian-gnome
|
- name: debian-gnome
|
||||||
box: aa-debian-gnome
|
box: aa-debian-gnome
|
||||||
uefi: true
|
|
||||||
ram: '6144'
|
|
||||||
cpu: '6'
|
|
||||||
|
|
||||||
- name: debian-kde
|
- name: debian-kde
|
||||||
box: aa-debian-kde
|
box: aa-debian-kde
|
||||||
uefi: true
|
|
||||||
ram: '6144'
|
|
||||||
cpu: '6'
|
|
||||||
|
|
||||||
- name: opensuse-kde
|
- name: opensuse-kde
|
||||||
box: aa-opensuse-kde
|
box: aa-opensuse-kde
|
||||||
uefi: true
|
|
||||||
ram: '6144'
|
|
||||||
cpu: '6'
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue