How to use Foreman and allocate static ip address

Hi,
One of the basic requirements in my lab is to be able to work with static
IPs.

As much as i understand, Foreman add hosts record to dhcp leases. At that
point i would like to configure the given IP as static address.
One of the issues that occurred in this scenario is that Foreman can
suggest this IP to another host.

What should be the best solution for static address allocation with foreman?

Thanks

Edit your pxelinux template to include &static=yes at the end of the
foreman_url and adjust your provisioning template to make use of that to
set the address statically on your host. The example kickstart does this:

network --bootproto <%= @static ? "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 %>

Matt

··· On Mon, Sep 8, 2014 at 10:52 AM, Avi Tal wrote:

Hi,
One of the basic requirements in my lab is to be able to work with static
IPs.

As much as i understand, Foreman add hosts record to dhcp leases. At that
point i would like to configure the given IP as static address.
One of the issues that occurred in this scenario is that Foreman can
suggest this IP to another host.

What should be the best solution for static address allocation with
foreman?

Thanks


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Struggling to get this to work.

I've edited the "Kickstart default PXELinux" with the &static=yes appended
to the foreman_url and it still doesn't work. Is this document correct on
where to append the foreman_url?
KickstartStatic - Foreman Tried
that and other iterations, another page recommended ?static=yes which I
think should be changed.
TemplateWriting - Foreman

When creating a new host I did the resolve provisioning template and it
does use Kickstart default PXELinux. I haven't made any modifications to
that template other than trying to add the foreman_url.

I'm using a slightly modified version of the provided kickstart templates
and I have the same line for the network settings. I interpret the "static
?" to be {if static=true then use static address}. Tried setting this as a
parameter for the VM which doesn't seem to work. Is that what the
&static=yes in foreman_url is setting?

Thanks

··· On Monday, September 8, 2014 11:39:41 AM UTC-5, Matthew Hyclak wrote: > > Edit your pxelinux template to include &static=yes at the end of the > foreman_url and adjust your provisioning template to make use of that to > set the address statically on your host. The example kickstart does this: > > network --bootproto <%= @static ? "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 %> > > Matt > > > On Mon, Sep 8, 2014 at 10:52 AM, Avi Tal > wrote: > >> Hi, >> One of the basic requirements in my lab is to be able to work with static >> IPs. >> >> As much as i understand, Foreman add hosts record to dhcp leases. At that >> point i would like to configure the given IP as static address. >> One of the issues that occurred in this scenario is that Foreman can >> suggest this IP to another host. >> >> What should be the best solution for static address allocation with >> foreman? >> >> Thanks >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Foreman users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to foreman-user...@googlegroups.com . >> To post to this group, send email to forema...@googlegroups.com >> . >> Visit this group at http://groups.google.com/group/foreman-users. >> For more options, visit https://groups.google.com/d/optout. >> > >