luke.bigum
2011-Feb-11 09:34 UTC
[Puppet Users] force the file name of a yumrepo created file
Hi list, Before I raise a feature request, is there a way to force the name of the .repo file a yumrepo is created in? By default if no existing repo exists, the file name that gets created for it is $name.repo. It would be nice if you could specify the file name, for example on CentOS systems you could force the filename of the [base] and [updates] repo to be CentOS-Base.repo. This only becomes a problem if say Puppet was repairing missing Yum repos and recreated [base] as /etc/yum.repos.d/base.repo. Update the RPM centos-release and now you''ve got two repositories named [base]. Thanks, -Luke -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Daniel Pittman
2011-Feb-11 19:04 UTC
Re: [Puppet Users] force the file name of a yumrepo created file
On Fri, Feb 11, 2011 at 01:34, luke.bigum <luke.bigum@fasthosts.co.uk> wrote:> Before I raise a feature request, is there a way to force the name of > the .repo file a yumrepo is created in?Nope, sorry. The code doesn''t support that at this time. Fixing it wouldn''t be terribly hard, and as long as the default behaviour was identical to today you should be OK, I think. You would have to supply appropriate tests, though, to make sure that multiple repos with the same filename worked as desired. Personally, we took the approach of explicitly defining the repos we wanted the puppet way, and using the trick of putting a recursive file overlay on the repos.d directory, from an empty directory, and removing anything that wasn''t managed by puppet. That gets you what you expect, and prevents package updates tromping all over your careful configuration. Regards, Daniel -- ⎋ Puppet Labs Developer – http://puppetlabs.com ✉ Daniel Pittman <daniel@puppetlabs.com> ✆ Contact me via gtalk, email, or phone: +1 (877) 575-9775 ♲ Made with 100 percent post-consumer electrons -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.