Correct method for declaring host ip configuration in kickstart

Hello,
I am having some odd troubles in assigning a static IP to my hosts at install time. The default DHCP options work just fine and foreman dutifully creates the static DHCP reservation but I would like to have the kickstart hard code my ip address into the host being built.

I have a line in my KS template that reads as

network --bootproto=static --ip=<%= @host.ip %> --netmask=<%= @host.subnet.netmask %> --hostname=<%= @host %> --gateway=<% @host.subnet.gateway %> --dns=<%= @host.subnet.dns %>

However this does not seem to render I get an error suggesting an " undefined method 'subnet' for Host::Jail (Host) ". I took the variable names from the wiki page on TemplateWriting#Functions-and-macros

And pointers would be highly appreciated.

Thanks

> Hello,
> I am having some odd troubles in assigning a static IP to my hosts at
> install time. The default DHCP options work just fine and foreman dutifully
> creates the static DHCP reservation but I would like to have the kickstart
> hard code my ip address into the host being built.
>
> I have a line in my KS template that reads as
>
> network --bootproto=static --ip=<%= @host.ip %> --netmask=<%=
> @host.subnet.netmask %> --hostname=<%= @host %> --gateway=<%
> @host.subnet.gateway %> --dns=<%= @host.subnet.dns %>
>
> However this does not seem to render I get an error suggesting an "
> undefined method 'subnet' for Host::Jail (Host) ". I took the variable
> names from the wiki page on TemplateWriting#Functions-and-macros
>
> And pointers would be highly appreciated.
>

Which version of foreman are you using? we've fixed an issue with subnets
and safe mode rendering, which is part of the 1.1 release.

if you want, you can safely apply this patch
https://github.com/theforeman/foreman/commit/8bd4e48
or turn off safe mode rendering (search under settings).

Ohad

··· On Sun, Dec 16, 2012 at 1:57 PM, Luke Kearney wrote:

Thanks


You received this message because you are subscribed to the Google Groups
“Foreman users” group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

Ohad,

Thanks,
> Which version of foreman are you using? we've fixed an issue with subnets and safe mode rendering, which is part of the 1.1 release.
>
> if you want, you can safely apply this patch https://github.com/theforeman/foreman/commit/8bd4e48
> or turn off safe mode rendering (search under settings).

We are on 1.0.1 and eagerly awaiting 1.1

Regards