[chef] Re: Enabling/disabling yum repos


Chronological Thread 
  • From: Sean OMeara < >
  • To: " " < >
  • Subject: [chef] Re: Enabling/disabling yum repos
  • Date: Tue, 21 Oct 2014 14:13:29 -0400

Hi Eric.

I can't seem to reproduce this.... I would expect this to work the way
you tried.

I just spot checked this in test-kitchen:

suites:
- name: default
  run_list:
  - recipe[yum-repoforge::default]
  attributes:
    yum:
      rpmforge:
        enabled: false

As expected....
- update content in file /etc/yum.repos.d/rpmforge.repo from ce2b6c to 5f4f85
- execute yum -q makecache --disablerepo=* --enablerepo=rpmforge
- execute the ruby block yum-cache-reload-rpmforge

Next, I added a test wrapper cookbook and a bats test (currently in
master), to try and reproduce it.

https://github.com/opscode-cookbooks/yum-repoforge/blob/master/test/fixtures/cookbooks/yum-repoforge-wrapper/recipes/default.rb

and

https://github.com/opscode-cookbooks/yum-repoforge/blob/master/test/integration/includerecipe/bats/test_for_disabled.bats#L5

Everything looks good to me... Tested on el5 and el6.

-s


On Tue, Oct 21, 2014 at 11:43 AM, eric 
< >
 wrote:
> I'm trying to figure out how to enable and disable yum repos with the 3.x 
> yum
> and yum-* cookbooks.
>
> I've tried this, but it doesn't appear to be working:
>
> node.default['yum']['rpmforge']['enabled'] = false
> node.default['yum']['rpmforge']['managed'] = true
> include_recipe 'yum-repoforge'
>
> Can anyone help with this?
>
> Thanks.
>
> Eric



Archive powered by MHonArc 2.6.16.

§