[chef] Re: Re: toggling yum repos to enabled, disabled

Chronological Thread 
  • From: "Eric G. Wolfe" < >
  • To:
  • Subject: [chef] Re: Re: toggling yum repos to enabled, disabled
  • Date: Mon, 02 Apr 2012 22:23:41 -0400

On 04/02/2012 05:54 PM, John Alberts wrote:
I ran into this problem yesterday.  In the yum cookbook file
yum/providers/respository.rb, comment out the following line:
unless ::File.exists?("/etc/yum.repos.d/#{new_resource.repo_name}.repo")

I don't understand the point of this line anyway.
This check doesn't seem to make sense. Essentially, "unless" means "not if" when testing if the file exists. The template resource within that block should be idempotent without that File.exists check.

It could lead to undesired behavior if you want to update an already managed repo. I cannot say I have noticed this effect in all the time I've used this resource, however. It could be a bug. Unless I am reading that wrong, and the line is intended for some other purpose.

Archive powered by MHonArc 2.6.16.