You could script that a number of ways using the cobbler cli or it's xml-rpc api. You could parse your hosts file and use the cobbler cli to add the hosts or you could do the same asking dns for that information. If you can manually add a single host to cobbler with the cli you'll see how you can do that in a loop and then it's just a matter of giving it the right arguments. I wrote a import script to pull from a mysql database with a custom schema into cobbler over xml-rpc. You could modify the mysql parts and add some get from dns or hosts file parts. Hopefully it's a helpful reference for your importing fun.
http://github.com/jsabo/cobbler_misc/blob/master/mysqldb-to-cblr.py On Tue, May 18, 2010 at 7:48 AM, Matt Wallace <[email protected]> wrote: > Hi all, > > Is it possible to perform a "mass import" of hosts? > > We currently have all our hosts in /etc/hosts as well as DNS and I'm > wondering if there is an easy way to import these hosts into Cobbler so > we can start to manage the DHCP for the entire network via Cobbler. > > Thanks in advance, > > Matt > > _______________________________________________ > cobbler mailing list > [email protected] > https://fedorahosted.org/mailman/listinfo/cobbler > _______________________________________________ cobbler mailing list [email protected] https://fedorahosted.org/mailman/listinfo/cobbler
