From 0d40357819a75bcf69161bd6282c00582b5784b7 Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Mon, 22 Oct 2018 16:55:44 +0000 Subject: [PATCH 1/2] 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 --- ansible/host_setup.yml | 6 ++++++ ansible/host_vars/localhost | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ansible/host_setup.yml b/ansible/host_setup.yml index 398108e..6fe6a90 100644 --- a/ansible/host_setup.yml +++ b/ansible/host_setup.yml @@ -14,6 +14,11 @@ - include_tasks: hypervisor_setup.yml - hosts: libvirt + vars: + nodes: >- + {{ hostvars.localhost.tenks_state[inventory_hostname].nodes + | default([]) }} + libvirt_enable_efi_default: "{{ 'efi' in (nodes | map(attribute='boot_firmware') | map('lower')) }}" tasks: - block: - name: Configure host for Libvirt @@ -29,6 +34,7 @@ owner: "{{ libvirt_pool_owner }}" group: "{{ libvirt_pool_group }}" libvirt_host_require_vt: "{{ libvirt_require_vt }}" + libvirt_host_enable_efi_support: "{{ libvirt_enable_efi | default(libvirt_enable_efi_default) }}" - name: Set up Virtual BMC daemon include_role: diff --git a/ansible/host_vars/localhost b/ansible/host_vars/localhost index 0803e20..8c43b5f 100644 --- a/ansible/host_vars/localhost +++ b/ansible/host_vars/localhost @@ -14,7 +14,9 @@ cmd: deploy # memory_mb: 1024 # # The number of virtual CPUs. # vcpus: 2 -# # A list of volumes, each with a capacity. +# # The boot firmware to use. Can be one of: bios, or efi. +# boot_firmware: bios +# # A list of volumes, each with a capacity.# # volumes: # - capacity: 2GB # # A list of physical network names to connect to. These physical network From 566789e90e348b6dd728a96d1ac7906dd184ec99 Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Tue, 23 Oct 2018 09:48:03 +0000 Subject: [PATCH 2/2] Remove trailing whitespace --- ansible/host_setup.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/host_setup.yml b/ansible/host_setup.yml index 6fe6a90..ff0579f 100644 --- a/ansible/host_setup.yml +++ b/ansible/host_setup.yml @@ -18,7 +18,7 @@ nodes: >- {{ hostvars.localhost.tenks_state[inventory_hostname].nodes | default([]) }} - libvirt_enable_efi_default: "{{ 'efi' in (nodes | map(attribute='boot_firmware') | map('lower')) }}" + libvirt_enable_efi_default: "{{ 'efi' in (nodes | map(attribute='boot_firmware') | map('lower')) }}" tasks: - block: - name: Configure host for Libvirt