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*]
|
# [*syslinux_path*]
|
||||||
# (optional) Path to directory containing syslinux files.
|
# (optional) Path to directory containing syslinux files.
|
||||||
|
# Setting this to False will skip syslinux related resources.
|
||||||
# Defaults to '$::ironic::params::syslinux_path'
|
# Defaults to '$::ironic::params::syslinux_path'
|
||||||
#
|
#
|
||||||
# [*syslinux_files*]
|
# [*syslinux_files*]
|
||||||
@ -115,6 +116,7 @@ class ironic::pxe (
|
|||||||
content => "r ^([^/]) ${tftp_root_real}/\\1",
|
content => "r ^([^/]) ${tftp_root_real}/\\1",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if $syslinux_path {
|
||||||
ensure_resource( 'package', 'syslinux', {
|
ensure_resource( 'package', 'syslinux', {
|
||||||
ensure => $package_ensure,
|
ensure => $package_ensure,
|
||||||
name => $::ironic::params::syslinux_package,
|
name => $::ironic::params::syslinux_package,
|
||||||
@ -126,6 +128,7 @@ class ironic::pxe (
|
|||||||
destination_directory => $tftp_root_real,
|
destination_directory => $tftp_root_real,
|
||||||
require => Anchor['ironic-inspector::install::end'],
|
require => Anchor['ironic-inspector::install::end'],
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ensure_resource( 'package', 'ipxe', {
|
ensure_resource( 'package', 'ipxe', {
|
||||||
ensure => $package_ensure,
|
ensure => $package_ensure,
|
||||||
|
@ -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
|
||||||
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
|
end
|
||||||
|
|
||||||
on_supported_os({
|
on_supported_os({
|
||||||
|
Loading…
Reference in New Issue
Block a user