Skip to content

Commit 0d40357

Browse files
committed
Add support for EFI boot mode
This requires upstream support in stackhpc.libvirt-host and stackhpc.libvirt-vm, see: - stackhpc/ansible-role-libvirt-vm#12 - stackhpc/ansible-role-libvirt-host#7
1 parent 207bcab commit 0d40357

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

ansible/host_setup.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
- include_tasks: hypervisor_setup.yml
1515

1616
- hosts: libvirt
17+
vars:
18+
nodes: >-
19+
{{ hostvars.localhost.tenks_state[inventory_hostname].nodes
20+
| default([]) }}
21+
libvirt_enable_efi_default: "{{ 'efi' in (nodes | map(attribute='boot_firmware') | map('lower')) }}"
1722
tasks:
1823
- block:
1924
- name: Configure host for Libvirt
@@ -29,6 +34,7 @@
2934
owner: "{{ libvirt_pool_owner }}"
3035
group: "{{ libvirt_pool_group }}"
3136
libvirt_host_require_vt: "{{ libvirt_require_vt }}"
37+
libvirt_host_enable_efi_support: "{{ libvirt_enable_efi | default(libvirt_enable_efi_default) }}"
3238

3339
- name: Set up Virtual BMC daemon
3440
include_role:

ansible/host_vars/localhost

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ cmd: deploy
1414
# memory_mb: 1024
1515
# # The number of virtual CPUs.
1616
# vcpus: 2
17-
# # A list of volumes, each with a capacity.
17+
# # The boot firmware to use. Can be one of: bios, or efi.
18+
# boot_firmware: bios
19+
# # A list of volumes, each with a capacity.#
1820
# volumes:
1921
# - capacity: 2GB
2022
# # A list of physical network names to connect to. These physical network

0 commit comments

Comments
 (0)