Hi,
I ran into a problem with hosts that were installed using cobbler, of
which their profile's repositories changed on the cobbler server after
installation. The host's repo definitions were incorrect (yum didn't
work anymore since the baseurl was modified) and needed to be updated.
I wrote a small script that:
- contacts the cobbler server over XMLRPC, specifying a system
- asks what profile exists for the system
- asks what repositories exist for the profile
- downloads the repo's config.repo file
- does some string-replacing (change ${server} to cobbler host)
- saves each repo as a .repo file
get it at:
http://fedorapeople.org/~leon/files/cobbler/download-repos.py
Tested on cobbler 1.6.6 and 2.0.3.1
I hope this is useful to someone.
regards,
Léon
PS: if there's a better way (other than using puppet or something to
manage your repositories), please let me know ;)