KickstartStatic » History » Version 1
Stephen Benjamin, 05/13/2014 06:08 PM
1 | 1 | Stephen Benjamin | h1. Kickstart Static IP |
---|---|---|---|
2 | |||
3 | The default kickstart templates that come with Foreman have support for setting a static IP. |
||
4 | |||
5 | In order to enable that, you need to edit the PXE template and add &static=yes to the |
||
6 | end of each instance of foreman_url('provision'), like in this example below: |
||
7 | |||
8 | <pre> |
||
9 | default linux |
||
10 | label linux |
||
11 | kernel <%= @kernel %> |
||
12 | <% if @host.operatingsystem.name == 'Fedora' and @host.operatingsystem.major.to_i > 16 -%> |
||
13 | append initrd=<%= @initrd %> ks=<%= foreman_url('provision')%>&static=yes ks.device=bootif network ks.sendmac |
||
14 | <% elsif @host.operatingsystem.name != 'Fedora' and @host.operatingsystem.major.to_i >= 7 -%> |
||
15 | append initrd=<%= @initrd %> ks=<%= foreman_url('provision')%>&static=yes network ks.sendmac |
||
16 | <% else -%> |
||
17 | append initrd=<%= @initrd %> ks=<%= foreman_url('provision')%>&static=yes ksdevice=bootif network kssendmac |
||
18 | <% end -%> |
||
19 | IPAPPEND 2 |
||
20 | </pre> |
||
21 | |||
22 | There's an open feature request #5458 to make this more user friendly. |