Refactor logic to determine syslinux_path
We can merge current two if/case blocks into one to simplify the logic to determine the value according to $::osfamily and $::os_package_type. Change-Id: Id769c4482971f1185324e923762f94c5b12b0e28
This commit is contained in:
@@ -25,14 +25,6 @@ class ironic::params {
|
|||||||
$pyvers = $::openstacklib::defaults::pyvers
|
$pyvers = $::openstacklib::defaults::pyvers
|
||||||
$pyver3 = $::openstacklib::defaults::pyver3
|
$pyver3 = $::openstacklib::defaults::pyver3
|
||||||
|
|
||||||
if ($::os_package_type == 'debian') {
|
|
||||||
$syslinux_path_custom = '/usr/lib/syslinux'
|
|
||||||
} elsif ($::os['family'] == 'RedHat'){
|
|
||||||
$syslinux_path_custom = '/tftpboot'
|
|
||||||
} else {
|
|
||||||
$syslinux_path_custom = '/var/lib/tftpboot'
|
|
||||||
}
|
|
||||||
|
|
||||||
$dbsync_command =
|
$dbsync_command =
|
||||||
'ironic-dbsync --config-file /etc/ironic/ironic.conf'
|
'ironic-dbsync --config-file /etc/ironic/ironic.conf'
|
||||||
$inspector_dbsync_command =
|
$inspector_dbsync_command =
|
||||||
@@ -64,7 +56,7 @@ class ironic::params {
|
|||||||
$tftpd_package = 'tftp-server'
|
$tftpd_package = 'tftp-server'
|
||||||
$ipxe_package = 'ipxe-bootimgs'
|
$ipxe_package = 'ipxe-bootimgs'
|
||||||
$syslinux_package = 'syslinux-tftpboot'
|
$syslinux_package = 'syslinux-tftpboot'
|
||||||
$syslinux_path = $syslinux_path_custom
|
$syslinux_path = '/tftpboot'
|
||||||
$syslinux_files = ['pxelinux.0', 'chain.c32', 'ldlinux.c32']
|
$syslinux_files = ['pxelinux.0', 'chain.c32', 'ldlinux.c32']
|
||||||
}
|
}
|
||||||
'Debian': {
|
'Debian': {
|
||||||
@@ -89,7 +81,11 @@ class ironic::params {
|
|||||||
$tftpd_package = 'tftpd'
|
$tftpd_package = 'tftpd'
|
||||||
$ipxe_package = 'ipxe'
|
$ipxe_package = 'ipxe'
|
||||||
$syslinux_package = 'syslinux-common'
|
$syslinux_package = 'syslinux-common'
|
||||||
$syslinux_path = $syslinux_path_custom
|
if ($::os_package_type == 'debian') {
|
||||||
|
$syslinux_path = '/usr/lib/syslinux'
|
||||||
|
} else {
|
||||||
|
$syslinux_path = '/var/lib/tftpboot'
|
||||||
|
}
|
||||||
$syslinux_files = ['pxelinux.0', 'chain.c32', 'libcom32.c32', 'libutil.c32']
|
$syslinux_files = ['pxelinux.0', 'chain.c32', 'libcom32.c32', 'libutil.c32']
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
Reference in New Issue
Block a user