[et-mgmt-tools] cobbler system add

Michael DeHaan mdehaan at redhat.com
Mon Jul 30 19:47:21 UTC 2007


drew einhorn wrote:
> Near the end of %post I issued a cobbler system add command
> to bind the dynamically assigned ip to the mac address.

DHCP reservations work exceedingly well.   If you have manage_dhcp 
turned on in your /var/lib/cobbler/settings it will write your dhcp.conf 
for you.
dnsmasq works even better as you can also pin the hostname from cobbler 
(dnsmasq does both DHCP and DNS, and cobbler can auto-configure it).  

Example:

vi /var/lib/cobbler/settings
manage_dhcp : 1
manage_dhcp_mode : dnsmasq

# cobbler system add --name=foo --mac=AA:BB:CC:DD:EE:FF 
--ip=192.168.1.50 --hostname="foo.example.com"

This will ensure that when MAC address AA:BB:CC:DD:EE:FF boots it will 
automatically get the designed IP and (if using dnsmasq) the given hostname.

if you leave manage_dhcp mode to "isc" (the default), you still get the 
variable $hostname accessible in your kickstart templates, so you can 
still set hostname/etc, but you will
have other hoops to jump through to make it actually use it.   Which is 
what I think you are alluding to below:




>
> After trying it and seeing that it was not working, I said:
>
> Duhhhh!!!!
>
> It needs to run on the cobbler host, not the box being provisioned.
>
> Is there an easy way to do this? 
> I can think of some that are not easy.

Possibly including...

(A) just-once-single-command-authorized-root-ssh (kind of scary)
(B) CGI script (still scary)

???

Both of which pose interesting security issues.   DHCP reservations are 
the way to go, IMHO, because they can be done entirely server side -- 
but I'm not a network administrator and you might have valid reasons for 
not doing things that way. 

>
> -- 
> Drew Einhorn
> ------------------------------------------------------------------------
>
> _______________________________________________
> et-mgmt-tools mailing list
> et-mgmt-tools at redhat.com
> https://www.redhat.com/mailman/listinfo/et-mgmt-tools




More information about the et-mgmt-tools mailing list