puppet-prod/site/profiles/manifests/cobbler/ipxebins.pp
Ben Vincent 80b7ad8639 feat: add cobbler profile
- add datavol to cobbler nodes
- add cobbler profile
- add cobbler role hieradata
- manage selinux where required for cobbler
- manage service cname
2024-03-29 08:36:42 +11:00

47 lines
1.4 KiB
Puppet

# profiles::cobbler::ipxebins
class profiles::cobbler::ipxebins {
# download the custom undionly.kpxe file
# https://gist.github.com/rikka0w0/50895b82cbec8a3a1e8c7707479824c1
exec { 'download_undionly_kpxe':
command => 'wget -O /var/lib/tftpboot/undionly.kpxe http://repos.main.unkin.net/unkin/8/x86_64/os/Archives/undionly.kpxe',
path => ['/bin', '/usr/bin'],
creates => '/var/lib/tftpboot/undionly.kpxe',
}
# set correct permissions ipxe boot image to tftpboot
file { '/var/lib/tftpboot/undionly.kpxe':
ensure => 'file',
owner => 'root',
group => 'root',
mode => '0644',
require => [
Package['ipxe-bootimgs'],
Package['cobbler'],
Exec['download_undionly_kpxe']
],
}
# download the custom ipxe.efi file
# https://gist.github.com/rikka0w0/50895b82cbec8a3a1e8c7707479824c1
exec { 'download_ipxe_efi':
command => 'wget -O /var/lib/tftpboot/ipxe.efi http://repos.main.unkin.net/unkin/8/x86_64/os/Archives/ipxe.efi',
path => ['/bin', '/usr/bin'],
creates => '/var/lib/tftpboot/ipxe.efi',
}
# set correct permissions ipxe boot image to tftpboot
file { '/var/lib/tftpboot/ipxe.efi':
ensure => 'file',
owner => 'root',
group => 'root',
mode => '0644',
require => [
Package['ipxe-bootimgs'],
Package['cobbler'],
Exec['download_ipxe_efi']
],
}
}