# Install yum-updatesd service # class yum::updatesd { package { "yum-updatesd": ensure => installed, } file { "/etc/yum/yum-updatesd.conf": ensure => present, source => [ "puppet:///files/yum/yum-updatesd.conf.${fqdn}", "puppet:///files/yum/yum-updatesd.conf", "puppet:///modules/yum/yum-updatesd.conf", ], mode => 0644, owner => root, group => root, notify => Service["yum-updatesd"], } service { "yum-updatesd": ensure => running, enable => true, hasstatus => true, require => Package["yum-updatesd"], } } # Add new yum repository. # # === Parameters # # $name: # Repository name. # $baseurl: # Base URL for this repository. # $mirrorlist: # Mirrorlist URL for this repository. # $descr: # Repository description. Defaults to $name. # $gpgkey: # Location where GPG signing key can be found. If not set # GPG check will be disabled. # # === Sample usage # # yum::repo { "tmz-puppet": # baseurl => "http://tmz.fedorapeople.org/repo/puppet/epel/5/i386/", # descr => "Puppet for EL 5 - i386", # gpgkey => "http://tmz.fedorapeople.org/repo/RPM-GPG-KEY-tmz", # } # define yum::repo($baseurl="", $mirrorlist="", $descr="", $gpgkey="") { tag("bootstrap") if !$baseurl and !$mirrorlist { fail("Either \$baseurl or \$mirrorlist needs to be defined for yum::repo") } if $baseurl and $mirrorlist { fail("Cannot set both \$baseurl and \$mirrorlist for yum::repo") } if $descr { $descr_real = $descr } else { $descr_real = $name } file { "/etc/yum.repos.d/${name}.repo": ensure => present, content => template("yum/yum.repo.erb"), mode => 0644, owner => "root", group => "root", } }