Clients are registered to Foreman and using Foreman repos for CentOS and EPEL package updates instead of the default CentOS and EPEL mirrors. The default repos in /etc/yum.repos.d are all disabled in their individual repo files with “enabled=0”
yum update completes and the CentOS and EPEL repo files in yum.repos.d are untouched or the repos at least stay disabled
yum update completes and the CentOS and EPEL repo files in yum.repos,d are overwritten and the repos are all enabled again by default.
For EPEL, I suspect I can just “yum remove epel-release*” to remove the repository entirely to fix that. Is there a similar CentOS package I need to yum remove as well to remove the CentOS default repos in yum.repos.d so they won’t enable themselves again every time I yum update? Or is there another way to prevent this behavior from happening?
That’s the part that’s confusing to me is that typical CentOS behavior for conf files etc. is to NOT overwrite files if they’ve been edited. In those cases it copies the new files in with a *.rpmnew extension (or something similar). So even though I’ve edited the CentOS-Base.repo file and added the “enabled=0” line for all repos, it’s overwriting my edited file. Thanks for your workaround!