Cleaning up repos in cobbler

Here’s a cobbler snippet that disables the default repomirror (presuming you are serving the rpms yourself) and adds the updates channel

# disable Centos Base Repo (get updates elsewhere)
sed -i -e 's/^/#/g' /etc/yum.repos.d/CentOS-Base.repo
# download updates repo file
wget -O - http://$http_server/cobbler/repo_mirror/Centos6-UPDATES/config.repo > /etc/yum.repos.d/Centos6-Updates.repo
sed -i -e 's/\${http_server}/$http_server/' /etc/yum.repos.d/Centos6-Updates.repo

Change the name of the update repo to suit & include it the post section of your .ks template.

Including the update channel in the cobbler profile broke for me – and others too (freezes when it tries to install dbus).


Leave a Reply

Your email address will not be published. Required fields are marked *