Puppet Class: psick::yum::cron
- Defined in:
- manifests/yum/cron.pp
Overview
This class installs and configures yum-cron
[View source]
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'manifests/yum/cron.pp', line 23
class psick::yum::cron (
Enum['present','absent'] $ensure = 'present',
String $config_file_template = 'psick/yum_cron/yum-cron.conf.erb',
Boolean $manage = $psick::manage,
Boolean $noop_manage = $psick::noop_manage,
Boolean $noop_value = $psick::noop_value,
) {
if $manage {
if $noop_manage {
noop($noop_value)
}
$options_default = {
'update_cmd' => 'default',
'update_messages' => 'yes',
'download_updates' => 'yes',
'apply_updates' => 'yes',
'random_sleep' => '360',
'system_name' => 'None',
'emit_via' => 'stdio',
'output_width' => '80',
'email_from' => 'root@localhost',
'email_to' => 'root',
'email_host' => 'localhost',
'group_list' => 'None',
'group_package_types' => 'mandatory, default',
'debuglevel' => '-2',
'mdpolicy' => 'group:main',
}
$options_user=lookup('psick::yum::cron::options', Hash, 'deep', {})
$options=merge($options_default,$options_user)
::tp::install { 'yum-cron':
ensure => $ensure,
}
if $config_file_template != '' {
::tp::conf { 'yum-cron':
ensure => $ensure,
template => $config_file_template,
options_hash => $options,
}
}
}
}
|