<%#
kind: PXELinux
name: Preseed default PXELinux
oses:
- Debian 6.0
- Debian 7.
- Debian 8.
- Ubuntu 10.04
- Ubuntu 12.04
- Ubuntu 13.04
- Ubuntu 14.04
%>
#
# 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.params['blacklist']
    options << @host.params['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
  options << "locale=#{@host.params['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
