KickstartStatic » History » Version 2
Marek Hulán, 03/18/2015 08:26 AM
1 | 1 | Stephen Benjamin | h1. Kickstart Static IP |
---|---|---|---|
2 | |||
3 | 2 | Marek Hulán | The default provisioning templates that come with Foreman have support for setting a static IP. |
4 | Configuration differs on Foreman 1.8+ and pre 1.8. |
||
5 | 1 | Stephen Benjamin | |
6 | 2 | Marek Hulán | h2. Foreman 1.8+ |
7 | |||
8 | The static or dhcp configuration is determined by Subnet to which interface is attached to. |
||
9 | If you do provisioning on Subnet with Boot mode set to static, provisioning template will |
||
10 | adjust configuration accordingly. Note that in most cases you must configure DNS server and |
||
11 | gateway on that subnet, because they won't be set by DHCP server. If you don't use DNS or |
||
12 | all your systems (e.g. installation medium) are on local subnet, you don't have to specify |
||
13 | these Subnet parameters. |
||
14 | |||
15 | h2. pre Foreman 1.8 |
||
16 | |||
17 | In order to enable static networking, you need to edit the PXE template and add &static=yes to the |
||
18 | 1 | Stephen Benjamin | end of each instance of foreman_url('provision'), like in this example below: |
19 | |||
20 | <pre> |
||
21 | default linux |
||
22 | label linux |
||
23 | kernel <%= @kernel %> |
||
24 | <% if @host.operatingsystem.name == 'Fedora' and @host.operatingsystem.major.to_i > 16 -%> |
||
25 | append initrd=<%= @initrd %> ks=<%= foreman_url('provision')%>&static=yes ks.device=bootif network ks.sendmac |
||
26 | <% elsif @host.operatingsystem.name != 'Fedora' and @host.operatingsystem.major.to_i >= 7 -%> |
||
27 | append initrd=<%= @initrd %> ks=<%= foreman_url('provision')%>&static=yes network ks.sendmac |
||
28 | <% else -%> |
||
29 | append initrd=<%= @initrd %> ks=<%= foreman_url('provision')%>&static=yes ksdevice=bootif network kssendmac |
||
30 | <% end -%> |
||
31 | IPAPPEND 2 |
||
32 | </pre> |
||
33 | |||
34 | There's an open feature request #5458 to make this more user friendly. |