I want to install RPMs only from my katello server but when I install rpm centos-release many new .repo files are added to the folder /etc/yum.repos.d/ pointing to the upstream yum repositories.
I thought about defining a filter in katello to skip the centos-release rpm but it also provides some other useful files e.g. /etc/redhat-release . I think I will configure my ansible playbooks to delete the extra .repos files added by this package but I wanted to ask how others are dealing with this. Is there any other more elegant way to deal with it that I am missing?
I am not aware of a more elegant solution and use also always configuration management to disable or remove additional repositories. In some environments this can be done quite easily, in others were additional repositories are allowed for additional software not included in RHEL/CentOS repositories it is more difficult.
One option is to empty the .repo files during the installation process. Otherwise they will be overwritten during an update procedure.
We use subscription_manager to solve this issue for orcharhino directly. @Bernhard_Suttner opened a pull request for this: https://github.com/candlepin/subscription-manager/pull/1961