Skip to content

Commit

Permalink
playbooks/ci_boot_machine_from_pxe: add support for UEFI PXE
Browse files Browse the repository at this point in the history
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é <[email protected]>
  • Loading branch information
dupremathieu committed Jun 7, 2022
1 parent 40caf9d commit 35192b5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions examples/inventories/advanced_inventory_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions inventories/seapath.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions playbooks/ci_boot_machine_from_pxe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"
Expand All @@ -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 }}"
Expand Down

0 comments on commit 35192b5

Please sign in to comment.