I wrote a cobbler_query.py script a while back to pull some of this
info out of a remote cobbler server. Might find it useful or perhaps
at least a bad example
https://github.com/weaselkeeper/cobbler_query.git
GPL2 so the usual 'take what you want' rules apply.
Nice. I'm sure there are multiple ways to do it -- my memory of
Cobbler's API is actually not that great now, as I've intentionally
forgotten a fair amount of it. I figure even with the same kind of
datastore and information people are going to want to extract and
slice it in different ways -- code generating the inventory file vs
using an inventory script is fair game too.
(Re: https://github.com/ansible/ansible-plugins/blob/master/inventory/cobbler.py
)