From 35192b5ce7ab1148ed3d68395e4b2589ac6a0ddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20Dupr=C3=A9?= Date: Fri, 13 May 2022 16:36:05 +0200 Subject: [PATCH] playbooks/ci_boot_machine_from_pxe: add support for UEFI PXE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add the inventory variable pxe_compatibility to select for which kind of machine the PXE container will be run: bios or uefi machine. Also adapt the playbooks with changes made on the SEAPATH PXE container. Signed-off-by: Mathieu Dupré --- examples/inventories/advanced_inventory_example.yaml | 2 ++ inventories/seapath.yaml | 2 ++ playbooks/ci_boot_machine_from_pxe.yaml | 5 +++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/examples/inventories/advanced_inventory_example.yaml b/examples/inventories/advanced_inventory_example.yaml index db0a3e6e4..bdab849a9 100644 --- a/examples/inventories/advanced_inventory_example.yaml +++ b/examples/inventories/advanced_inventory_example.yaml @@ -218,6 +218,8 @@ all: dhcp_bind_interface: "eth0" # The PXE ip address asigned to the "dhcp_bind_interface" interface pxe_server_address: "192.168.111.1" + # PXE compatibility bios, uefi or dual (default is dual) + pxe_compatibility: "dual" # Change the Ansible working folder to a rw accessible folder ansible_remote_tmp: /tmp/.ansible/tmp # The syslog server IP address where logs are centralized diff --git a/inventories/seapath.yaml b/inventories/seapath.yaml index 944f0af39..8643b32ea 100644 --- a/inventories/seapath.yaml +++ b/inventories/seapath.yaml @@ -232,6 +232,8 @@ all: dhcp_bind_interface: TODO # The PXE IP address assigned to the "dhcp_bind_interface" interface pxe_server_address: TODO + # PXE compatibility bios, uefi or dual (default is dual) + pxe_compatibility: TODO # The DHCP IP range used by the VMs DHCP server dhcp_vm_range_begin: TODO dhcp_vm_range_end: TODO diff --git a/playbooks/ci_boot_machine_from_pxe.yaml b/playbooks/ci_boot_machine_from_pxe.yaml index 14e8e31dd..e47b3db05 100644 --- a/playbooks/ci_boot_machine_from_pxe.yaml +++ b/playbooks/ci_boot_machine_from_pxe.yaml @@ -46,6 +46,7 @@ ip: "{{ power_control_ip | default(eg_ip) }}" passwd: "{{ power_control_passwd | default(eg_passwd) }}" powerup_script: "{{ power_control_script | default('../scripts/eg_pms2_lan_driver_power.sh') }}" + pxe_type: "{{ pxe_compatibility | default('dual') }}" tasks: - name: Create PXE configuration file template: @@ -56,7 +57,7 @@ recreate: true network_mode: host volumes: - - "{{ playbook_dir }}/../pxe_images:/tftpboot/syslinux/images:ro" + - "{{ playbook_dir }}/../pxe_images:/images:ro" - "{{ playbook_dir }}/pxe_extra_config.conf:/etc/dnsmasq.d/pxe_extra_config.conf:ro" auto_remove: true state: "started" @@ -70,7 +71,7 @@ DHCP_RANGE_END: "{{ dhcp_range_end }}" BIND_INTERFACE: "{{ dhcp_bind_interface }}" SERVER_ADDRESS: "{{ pxe_server_address }}" - PXE: "bios" + PXE: "{{ pxe_type }}" - name: Start machines include_tasks: tasks/start_machine.yaml with_items: "{{ ports }}"