Defined Type: pxe::images::centos
- Defined in:
- manifests/images/centos.pp
Overview
Class: pxe::images::centos
Retrieve the requested CentOS image
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 |
# File 'manifests/images/centos.pp', line 5
define pxe::images::centos(
$arch,
$ver,
$os = 'centos',
$baseurl = undef,
) {
$tftp_root = $pxe::tftp_root
if ! $baseurl {
$srclocation = "http://mirrors.kernel.org/${os}/${ver}/os/${arch}/images/pxeboot"
} else {
$srclocation = inline_template($baseurl)
}
exec {
"wget ${os} pxe linux ${arch} ${ver}":
path => ['/usr/bin', '/usr/local/bin'],
cwd => "${tftp_root}/images/${os}/${ver}/${arch}",
creates => "${tftp_root}/images/${os}/${ver}/${arch}/vmlinuz",
command => "wget ${srclocation}/vmlinuz";
"wget ${os} pxe initrd.img ${arch} ${ver}":
path => ['/usr/bin', '/usr/local/bin'],
cwd => "${tftp_root}/images/${os}/${ver}/${arch}",
creates => "${tftp_root}/images/${os}/${ver}/${arch}/initrd.img",
command => "wget ${srclocation}/initrd.img";
}
}
|