Static IP Assignment Appears Broken

I have a problem that I cannot solve and that is assigning static ip info
to the provisioned builds

Ive gone thru the docs and some of the foreman source code but cannot see
how @static is actually set

I have the following enabled on my PXELinux template - ks=<%=
foreman_url("provision")%>?static=yes
I have the following enabled on my Provision template - network --bootproto
<%= @static_proof ? "static --ip=#{@host.ip} --netmask=#{@host.subnet.mask}
–gateway=#{@host.subnet.gateway}
–nameserver=#{[@host.subnet.dns_primary,@host.subnet.dns_secondary].reject{|n|
n.blank?}.join(',')}" : 'dhcp' %> --hostname <%= @host %>

This is standard stuff but it does not work

The instance variable @static does not get set to true -

What am i missing

Im using Foreman 1.4

You need to change your PXELinux template to enable the @static
variable, like this:

ks=<%= foreman_url('provision')%>&static=yes

(part of the "append" line)

··· On 19/02/14 13:00, afam uzoka wrote: > I have a problem that I cannot solve and that is assigning static ip > info to the provisioned builds > > Ive gone thru the docs and some of the foreman source code but cannot > see how @static is actually set > > I have the following enabled on my PXELinux template - ks=<%= > foreman_url("provision")%>?static=yes > I have the following enabled on my Provision template - network > --bootproto <%= @static_proof ? "static --ip=#{@host.ip} > --netmask=#{@host.subnet.mask} --gateway=#{@host.subnet.gateway} > --nameserver=#{[@host.subnet.dns_primary,@host.subnet.dns_secondary].reject{|n| > n.blank?}.join(',')}" : 'dhcp' %> --hostname <%= @host %> > > This is standard stuff but it does not work > > The instance variable @static does not get set to true - > > What am i missing


Dominic Cleal
Red Hat Engineering