Project

General

Profile

Actions

KickstartStatic » History » Revision 1

Revision 1/2 | Next »
Stephen Benjamin, 05/13/2014 06:08 PM


Kickstart Static IP

The default kickstart templates that come with Foreman have support for setting a static IP.

In order to enable that, you need to edit the PXE template and add &static=yes to the
end of each instance of foreman_url('provision'), like in this example below:

default linux
label linux
kernel <%= @kernel %>
<% if @host.operatingsystem.name == 'Fedora' and @host.operatingsystem.major.to_i > 16 -%>
append initrd=<%= @initrd %> ks=<%= foreman_url('provision')%>&static=yes ks.device=bootif network ks.sendmac
<% elsif @host.operatingsystem.name != 'Fedora' and @host.operatingsystem.major.to_i >= 7 -%>
append initrd=<%= @initrd %> ks=<%= foreman_url('provision')%>&static=yes network ks.sendmac
<% else -%>
append initrd=<%= @initrd %> ks=<%= foreman_url('provision')%>&static=yes ksdevice=bootif network kssendmac
<% end -%>
IPAPPEND 2

There's an open feature request #5458 to make this more user friendly.

Updated by Stephen Benjamin about 10 years ago · 1 revisions