Puppet Class: pxe::syslinux
- Inherits:
- pxe::params
- Defined in:
- manifests/syslinux.pp
Overview
This class will install the syslinux images into the tftp root directory.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'manifests/syslinux.pp', line 4
class pxe::syslinux(
String[1] $syslinux_version,
String[1] $tftp_root,
String[1] $system_syslinux_dir = $pxe::params::system_syslinux_dir,
) inherits pxe::params {
if $syslinux_version == 'system' {
class { 'pxe::syslinux::system':
syslinux_dir => $system_syslinux_dir,
tftp_root => $tftp_root,
}
} elsif $syslinux_version =~ /^[1-9]/ {
$syslinux_major_version = $1
class { 'pxe::syslinux::direct':
syslinux_dir => "/usr/local/src/syslinux-${syslinux_version}",
syslinux_archive => "https://www.kernel.org/pub/linux/utils/boot/syslinux/${syslinux_major_version}.xx/syslinux-${syslinux_version}.tar.gz",
tftp_root => $tftp_root,
}
} else {
fail('Invalid Syslinux Version')
}
File {
owner => root,
group => 0,
mode => '0755',
require => File[$tftp_root],
}
file { $tftp_root:
ensure => directory,
require => undef,
}
file { "${tftp_root}/syslinux":
ensure => directory,
}
file { "${tftp_root}/pxelinux.cfg":
ensure => directory,
}
}
|