Allow alternative source files for /tftpboot/ipxe.efi

ipxe-bootimgs will soon include the ipxe efi variant
ipxe-snponly-x86_64.efi which has no networking stack, relying instead
on the UEFI networking stack. This image is required in some UEFI
environments instead of the full ipxe-x86_64.efi, so there needs to be
a mechanism for serving it by default.

This change makes this possible by setting the puppet parameter
ironic::pxe::ipxe_name_base to ipxe-snponly.

Change-Id: I3a0e85ce6d83001833c829f484baf181a677a5d9
This commit is contained in:
Steve Baker 2020-04-21 13:59:07 +12:00 committed by Takashi Kajinami
parent 06547f81a9
commit ca47ba7c7f
3 changed files with 19 additions and 5 deletions

View File

@ -51,6 +51,12 @@
# (optional) Boolean value to dtermine if ppc64le support should be enabled
# Defaults to false (no ppc64le support)
#
# [*ipxe_name_base*]
# (optional) Beginning of the source file name which is copied to
# $tftproot/ipxe.efi. Setting this to 'ipxe-snponly' on CentOS8 would result
# in the source file being /usr/share/ipxe/ipxe-snponly-x86_64.efi
# Defaults to 'ipxe'
#
class ironic::pxe (
$package_ensure = 'present',
$tftp_root = '/tftpboot',
@ -60,6 +66,7 @@ class ironic::pxe (
$syslinux_files = $::ironic::params::syslinux_files,
$tftp_bind_host = undef,
$enable_ppc64le = false,
$ipxe_name_base = 'ipxe',
) inherits ::ironic::params {
include ironic::deps
@ -165,7 +172,7 @@ class ironic::pxe (
})
file { "${tftp_root_real}/undionly.kpxe":
ensure => 'present',
ensure => 'file',
seltype => 'tftpdir_t',
owner => 'ironic',
group => 'ironic',
@ -176,12 +183,12 @@ class ironic::pxe (
}
file { "${tftp_root_real}/ipxe.efi":
ensure => 'present',
ensure => 'file',
seltype => 'tftpdir_t',
owner => 'ironic',
group => 'ironic',
mode => '0744',
source => "${::ironic::params::ipxe_rom_dir}/ipxe${arch}.efi",
source => "${::ironic::params::ipxe_rom_dir}/${ipxe_name_base}${arch}.efi",
backup => false,
require => Anchor['ironic-inspector::install::end'],
}

View File

@ -0,0 +1,7 @@
---
features:
- |
The parameter ironic::pxe::ipxe_name_base has been added, which allows
alternative ipxe files to be copied to /tftpboot/ipxe.efi. For example,
setting this to 'ipxe-snponly' on CentOS8 would result in the source file
being /usr/share/ipxe/ipxe-snponly-x86_64.efi.

View File

@ -106,7 +106,7 @@ describe 'ironic::pxe' do
'group' => 'ironic',
'require' => 'Anchor[ironic-inspector::install::end]',
'seltype' => 'tftpdir_t',
'ensure' => 'present',
'ensure' => 'file',
'backup' => false,
)
end
@ -116,7 +116,7 @@ describe 'ironic::pxe' do
'group' => 'ironic',
'require' => 'Anchor[ironic-inspector::install::end]',
'seltype' => 'tftpdir_t',
'ensure' => 'present',
'ensure' => 'file',
'backup' => false,
)
end