Conditionalize syslinux requirement
A non-bios architecture will not have a syslinux package and therefore cannot assume that it must be installed. Change-Id: I02e2cb556efe94c68f63e1b919b66cc1a5b9e5b1
This commit is contained in:
parent
45da0fa6a7
commit
3c41398138
@ -36,6 +36,7 @@
|
||||
#
|
||||
# [*syslinux_path*]
|
||||
# (optional) Path to directory containing syslinux files.
|
||||
# Setting this to False will skip syslinux related resources.
|
||||
# Defaults to '$::ironic::params::syslinux_path'
|
||||
#
|
||||
# [*syslinux_files*]
|
||||
@ -115,16 +116,18 @@ class ironic::pxe (
|
||||
content => "r ^([^/]) ${tftp_root_real}/\\1",
|
||||
}
|
||||
|
||||
ensure_resource( 'package', 'syslinux', {
|
||||
ensure => $package_ensure,
|
||||
name => $::ironic::params::syslinux_package,
|
||||
tag => ['openstack', 'ironic-ipxe', 'ironic-support-package'],
|
||||
})
|
||||
if $syslinux_path {
|
||||
ensure_resource( 'package', 'syslinux', {
|
||||
ensure => $package_ensure,
|
||||
name => $::ironic::params::syslinux_package,
|
||||
tag => ['openstack', 'ironic-ipxe', 'ironic-support-package'],
|
||||
})
|
||||
|
||||
ironic::pxe::tftpboot_file { $syslinux_files:
|
||||
source_directory => $syslinux_path,
|
||||
destination_directory => $tftp_root_real,
|
||||
require => Anchor['ironic-inspector::install::end'],
|
||||
ironic::pxe::tftpboot_file { $syslinux_files:
|
||||
source_directory => $syslinux_path,
|
||||
destination_directory => $tftp_root_real,
|
||||
require => Anchor['ironic-inspector::install::end'],
|
||||
}
|
||||
}
|
||||
|
||||
ensure_resource( 'package', 'ipxe', {
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- Allow skipping installation of syslinux. UEFI exclusive archiectures do
|
||||
not have syslinux support.
|
@ -120,6 +120,19 @@ describe 'ironic::pxe' do
|
||||
)
|
||||
end
|
||||
end
|
||||
context 'when excluding syslinux' do
|
||||
before :each do
|
||||
params.merge!(
|
||||
:syslinux_path => false,
|
||||
)
|
||||
end
|
||||
it 'should not contain package syslinux' do
|
||||
is_expected.not_to contain_package('syslinux')
|
||||
end
|
||||
it 'should not contain tftpboot syslinux file' do
|
||||
is_expected.not_to contain_file('/tftpboot/pxelinux.0')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
|
Loading…
Reference in New Issue
Block a user