class yum::config { file { "/etc/yum.conf": owner => 'root', group => 'root', mode => '0644', content => template('yum/yum.conf.erb'), } if (is_array($yum::repositories[$yum::profile])) { $listofrepos = array2hash($yum::repositories[$yum::profile], $yum::description) create_resources(yumrepo, $listofrepos) } $yum::groups.each |$group| { if (has_key($yum::grouplist, $group)) { if ($yum::grouplist[$group] != undef) { ensure_packages([$yum::grouplist[$group]]) } } else { notify {"Warning: yum group ${group} is absent from yum::grouplist !":} } } if $yum::autoupdate { package { "yum-cron": ensure => 'installed', } file { "/etc/yum/yum-cron.conf": ensure => present, source => "puppet:///modules/yum/yum-cron.conf", owner => 'root', group => 'root', mode => '0644', } file { "/etc/yum/yum-cron-hourly.conf": ensure => present, source => "puppet:///modules/yum/yum-cron-hourly.conf", owner => 'root', group => 'root', mode => '0644', } service { 'yum-cron': ensure => running, enable => true, } } }