I prefer copying the repos over using a template. This way all my CentOS boxes have the same repos. If I were to add any Fedora boxes to the mix I'd add the repos to the Fedora {} block.
case $operatingsystem { CentOS : { file { "epel" : path => "/etc/yum.repos.d/epel.repo", owner => root, group => root, mode => 644, content => template("yum-module/epel.repo.erb"), ensure => file } } Fedora : { # Fedora repos here } } Here is the template that goes in the /etc/puppet/modules/yum-module/template/ directory == SNIP == [epel] name=Extra Packages for Enterprise Linux <%= lsbmajdistrelease %> - $basearch #baseurl=http://download.fedoraproject.org/pub/epel/<%= lsbmajdistrelease %>/$basearch mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-<%= lsbmajdistrelease %>&arch=$basearch failovermethod=priority enabled=<%= enableme %> gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL == SNIP == -Brandon t.kend...@kew.org wrote: > I'm running puppet 0.24.6 on CentOS 5.2 from a puppetmaster on a > virtual server to a variety > of client servers both virtual and metal running either CentOS 5.2 or > Fedora Core 10. I want to > extend this to servers running RHEL 5 (and 6) in the near future. > > My problem is I have puppet set up with all repositories (mirrored > locally using cobbler) > included in one file in /etc/yum.repos.d/kewrepos.repo on the > puppermaster. This file contains > both Centos and Fedora repos and when I run a yum update I just -- > disablerepo=whichever I don't want, > which can be done as a cron job. > > The difficulty is sometimes puppet runs yum automatically, which loops > on a CentOS webserver > trying to reinstall httpd, getting confused by the presence of Fedora > repositories. > > My question is how can I set up puppet so that I can tell, once and > for all, The Fedora boxes to > look at the Fedora repos and the CentOS boxes to CentOS repos only? I > want to be able to > configure unlimited repos in the future for workstations (Fedora) and > servers (CentOS or RHEL). > > Thanks in advance > > Tim Kendall > > I just added Kew Gardens where I work to your Wiki list of users > > > --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---