Project

General

Profile

Download (1.5 KB) Statistics
| Branch: | Tag: | Revision:
<%#
kind: PXELinux
name: Preseed default PXELinux
model: ProvisioningTemplate
oses:
- Debian
- Ubuntu
test_on:
- debian4dhcp
- ubuntu4dhcp
description: |
The template to render PXELinux bootloader configuration for preseed based distributions.
The output is deployed on the host's subnet TFTP proxy.
-%>
#
# This file was deployed via '<%= template_name %>' template
#
# Supported host/hostgroup parameters:
#
# blacklist = module1, module2
# Blacklisted kernel modules
#
# lang = en_US
# System locale
#
<%
options = []
if host_param('blacklist')
options << host_param('blacklist').split(',').collect{|x| "#{x.strip}.blacklist=yes"}.join(' ')
end
if @host.operatingsystem.name == 'Debian'
options << "auto=true"
options << "domain=#{@host.domain}"
else
options << 'console-setup/ask_detect=false console-setup/layout=USA console-setup/variant=USA keyboard-configuration/layoutcode=us localechooser/translation/warn-light=true localechooser/translation/warn-severe=true'
end
if @host.provision_interface.vlanid.present?
options << "netcfg/use_vlan=true netcfg/vlan_id=#{@host.provision_interface.vlanid}"
end
options << "locale=#{host_param('lang') || 'en_US'}"
options = options.join(' ')
-%>
DEFAULT linux
LABEL linux
KERNEL <%= @kernel %>
APPEND initrd=<%= @initrd %> interface=auto url=<%= foreman_url('provision')%> ramdisk_size=10800 root=/dev/rd/0 rw auto hostname=<%= @host.name %> <%= options %>
IPAPPEND 2

<%= snippet_if_exists(template_name + " custom menu") %>
(7-7/16)