File tree Expand file tree Collapse file tree 5 files changed +57
-2
lines changed Expand file tree Collapse file tree 5 files changed +57
-2
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ default value is `true`.
39
39
system emulators, e.g. ` x86 ` . The default value is ` ['x86'] ` if
40
40
` libvirt_host_require_vt ` is ` false ` , otherwise the default value is an empty
41
41
list.
42
+ ` libvirt_vm_enable_efi_support ` : Whether to enable EFI support. This defaults
43
+ to false as extra packages need to be installed.
42
44
43
45
Dependencies
44
46
------------
Original file line number Diff line number Diff line change @@ -25,3 +25,7 @@ libvirt_host_require_vt: true
25
25
26
26
# List of architectures for which to install QEMU system emulators, e.g. x86.
27
27
libvirt_host_qemu_emulators : " {{ [] if libvirt_host_require_vt | bool else ['x86'] }}"
28
+
29
+ # Whether or not to enable UEFI support. In some cases this requires installing
30
+ # extra packages.
31
+ libvirt_host_enable_efi_support : false
Original file line number Diff line number Diff line change 8
8
- " {{ ansible_os_family }}.yml"
9
9
tags : vars
10
10
11
+ - name : Install custom yum repositories
12
+ # Although argument splatting is marked as deprecated:
13
+ #
14
+ # [DEPRECATION WARNING]: Using variables for task params is unsafe,
15
+ # especially if the variables come from an external source like facts. This
16
+ # feature will be removed in a future release.
17
+ #
18
+ # The core team had a a change of heart and it is actually being preserved:
19
+ # https://github.com/ansible/ansible/pull/43798
20
+ yum_repository : " {{ item }}"
21
+ loop : " {{ libvirt_host_custom_yum_repos | default([]) }}"
22
+ become : true
23
+
11
24
- name : Ensure libvirt packages are installed
12
25
package :
13
26
name : " {{ item }}"
Original file line number Diff line number Diff line change 1
1
---
2
2
# List of libvirt package dependencies.
3
- libvirt_host_libvirt_packages :
3
+ libvirt_host_libvirt_packages_default :
4
4
- libvirt-bin
5
5
- qemu-kvm
6
6
- python-libvirt
7
7
- python-lxml
8
+
9
+ # Packages that are only necessary if you require EFI support
10
+ libvirt_host_packages_efi :
11
+ - ovmf
12
+
13
+ # List of all packages to install
14
+ libvirt_host_libvirt_packages : >
15
+ {{ libvirt_host_libvirt_packages_default +
16
+ (libvirt_host_packages_efi if libvirt_host_enable_efi_support else []) | unique
17
+ }}
Original file line number Diff line number Diff line change 1
1
---
2
2
# List of libvirt package dependencies.
3
- libvirt_host_libvirt_packages :
3
+ libvirt_host_libvirt_packages_default :
4
4
- libvirt
5
5
- libvirt-daemon-kvm
6
6
- libvirt-python
7
7
- python-lxml
8
8
- qemu-kvm
9
+
10
+ # Packages that are only necessary if you require EFI support
11
+ libvirt_host_packages_efi :
12
+ - edk2.git-ovmf-x64 # Official OVMF package doesn't boot (CentOS 7.5)
13
+ - qemu-kvm-ev # Need smm support for secure boot
14
+
15
+ # List of all packages to install
16
+ libvirt_host_libvirt_packages : >
17
+ {{ libvirt_host_libvirt_packages_default +
18
+ (libvirt_host_packages_efi if libvirt_host_enable_efi_support else []) | unique
19
+ }}
20
+
21
+ libvirt_host_custom_yum_repos_efi :
22
+ # Add custom repository as OVMF package seems to be broken
23
+ - name : qemu-firmware-jenkins
24
+ description : upstream OVMF firmware images
25
+ baseurl : https://www.kraxel.org/repos/jenkins/
26
+ gpgcheck : no
27
+ # Need an updated version of qemu with smm support
28
+ - name : centos-qemu-ev
29
+ description : CentOS-$releasever - QEMU EV
30
+ baseurl : http://mirror.centos.org/$contentdir/$releasever/virt/$basearch/kvm-common/
31
+ gpgcheck : yes
32
+
33
+ libvirt_host_custom_yum_repos : " {{ libvirt_host_custom_yum_repos_efi if libvirt_host_enable_efi_support else [] | unique }}"
34
+
You can’t perform that action at this time.
0 commit comments