disabling the line you mentioned below helped me in another way, but
doesn’t address the problem i’m trying to solve:
with the unless condition in place in yum/providers/respository.rb, a
repo file that is already present on a system won’t get updated. i
don’t like that. :\ … so for that reason i’d want to disable that
unless (but i don’t like hand “patching” the code). are there other
options to updating a repo file in place without first calling
"action :remove", then “action :add” ?
back to the problem at hand, the result that i want is:
[yum.repos.d]# cat epel.repo
Generated by Chef for test-kallen
Local modifications will be overwritten.
name=Extra Packages for Enterprise Linux
… i want “enabled=0” so yum doesn’t access that repo by default. but
there are times when i might want to call upon epel by doing
–enablerepo=epel. and in order to do that, epel.repo must be present
on the filesystem. aye?
On Mon, 02 Apr 2012, John Alberts wrote:
I ran into this problem yesterday. In the yum cookbook file
yum/providers/respository.rb, comment out the following line:
I don’t understand the point of this line anyway.
On Mon, Apr 2, 2012 at 4:05 PM, email@example.com wrote:
i’m trying to wield the yumrepo cookbook to control the yum repos i dist
to my systems. by default, the yum_repository resource from the yum
cookbook marks the repo as enabled. so it seems i should be able to
toggle that and make the repo disabled by default. but my attempts are
this is the yum_repository block from the yumrepo::epel recipe:
yum_repository “epel” do
description "Extra Packages for Enterprise Linux"
above the action line i’ve tried adding ‘enabled “0”’ and ‘enabled 0’,
but the /etc/yum.repos.d/epel.repo shows up as “enabled=1”.
how do i toggle repos as enabled or disabled?