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.
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
> 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
or turn off safe mode rendering (search under settings).
Ohad
···
On Sun, Dec 16, 2012 at 1:57 PM, Luke Kearney wrote:
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).