Added yum::cron::download for automatic downloading of updates
This commit is contained in:
parent
ccf2db2aa7
commit
043c7f91b1
1 changed files with 36 additions and 0 deletions
|
@ -28,6 +28,42 @@ class yum::updatesd {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Cron job for automatic downloading of updates
|
||||||
|
#
|
||||||
|
class yum::cron::download {
|
||||||
|
|
||||||
|
include yum::plugin::downloadonly
|
||||||
|
|
||||||
|
cron { "yum-cron-download":
|
||||||
|
ensure => present,
|
||||||
|
command => "yum -d 0 -e 0 -y --downloadonly update",
|
||||||
|
user => "root",
|
||||||
|
hour => 3,
|
||||||
|
minute => fqdn_rand(60),
|
||||||
|
require => Package["yum-plugin-downloadonly"],
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Install downloadonly plugin
|
||||||
|
#
|
||||||
|
class yum::plugin::downloadonly {
|
||||||
|
|
||||||
|
package { "yum-plugin-downloadonly":
|
||||||
|
ensure => installed,
|
||||||
|
name => $operatingsystem ? {
|
||||||
|
"centos" => $operatingsystemrelease ? {
|
||||||
|
/^[1-5]/ => "yum-downloadonly",
|
||||||
|
default => "yum-plugin-downloadonly",
|
||||||
|
},
|
||||||
|
default => "yum-plugin-downloadonly",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Common prequisites for yum
|
# Common prequisites for yum
|
||||||
#
|
#
|
||||||
class yum::common {
|
class yum::common {
|
||||||
|
|
Loading…
Add table
Reference in a new issue