Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to consolidate my repository into a new repository structure and I have this working in Puppet. However, the old yum repository information still remains on the nodes. Can puppet force the removal of the old yum repository information? How do you do it?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

I think the best way to do this is to use a file resource with ensure => absent, as in

file { '/etc/yum.repos.d/crufty.repo':
  ensure => absent,
}

It doesn't look as if the yumrepo resource type supports removal (although you could set enabled => false, which in practice would get you the same behavior).

share|improve this answer
    
+1, this is exactly what we did. –  Sirex Aug 13 '13 at 21:33
    
Thank you! I am new to puppet and this helped me a ton. –  Brian Aug 15 '13 at 12:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.