- From:
- To:
- Subject: [chef] Re: Re: Re: toggling yum repos to enabled, disabled
- Date: Mon, 2 Apr 2012 17:35:33 -0700
ohhh hai. i figured out how to change the default value of the
attribute in yum/providers/respository.rb from my recipe. the answer
is not
enabled = '0'
nor is it
enabled => '0'
or other somesuch. the answer is:
enabled 0
full context:
yum_repository "epel" do
description "Extra Packages for Enterprise Linux"
key node['repo']['epel']['key']
url node['repo']['epel']['url']
mirrorlist true
action :add
enabled 0
end
go me.
thanks!
On Mon, 02 Apr 2012,
wrote:
>
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.
>
[epel]
>
name=Extra Packages for Enterprise Linux
>
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch
>
gpgcheck=1
>
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
>
enabled=0
>
>
.. 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?
- [chef] toggling yum repos to enabled, disabled, kallen, 04/02/2012
- [chef] Re: toggling yum repos to enabled, disabled, John Alberts, 04/02/2012
- [chef] Re: Re: toggling yum repos to enabled, disabled, kallen, 04/02/2012
- [chef] Re: Re: Re: toggling yum repos to enabled, disabled, kallen, 04/02/2012
- [chef] Re: Re: toggling yum repos to enabled, disabled, Eric G. Wolfe, 04/02/2012
- [chef] Re: Re: toggling yum repos to enabled, disabled, Eric G. Wolfe, 04/02/2012
Archive powered by MHonArc 2.6.16.