#!gpxe
<%#
kind: iPXE
name: Kickstart default iPXE
oses:
- CentOS 5
- CentOS 6
- CentOS 7
- Fedora 16
- Fedora 17
- Fedora 18
- Fedora 19
- Fedora 20
- RedHat 5
- RedHat 6
- RedHat 7
%>
<% subnet = @host.subnet -%>
<% if subnet.respond_to?(:dhcp_boot_mode?) && subnet.dhcp_boot_mode? -%>
  <% static = '' -%>
<% else -%>
  <% static_arg = 'static=yes' -%>
  <% static = (@host.token.nil? ? '?' : '&') + static_arg -%>
<% end -%>

<%# This template will not function with Safemode set to true.
    Please disable it in Settings > Provisioning               %>

kernel <%= "#{@host.url_for_boot(:kernel)}" %> ks=<%= foreman_url('provision')%><%= static %> ksdevice=<%= @host.mac %> network kssendmac ip=${netX/ip} netmask=${netX/netmask} gateway=${netX/gateway} dns=${dns}
initrd <%= "#{@host.url_for_boot(:initrd)}" %>

boot
