Skip to content
This repository has been archived by the owner on Jun 21, 2018. It is now read-only.

added yum_params for RHEL 5 & 6 only #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
###0.6.2

* Fix compatibility with Puppet 2.7 ([jenkins101](https://github.com/jenkins101))
* Partial revert of changes introduced in v0.6.1 (Puppet 4.x)

###0.6.1

* Fix compatibility with Puppet 4.0 ([jhoblitt](https://github.com/jhoblitt))
Expand Down Expand Up @@ -26,7 +31,7 @@ Fix compatibility with future parser in Puppet 3.7.4 ([PUP-3615](https://tickets

###0.4.0

* `update_cmd` can now be defined (thanks [Kim](https://github.com/ksaio)!)
* `update_cmd` can now be defined ([ksaio](https://github.com/ksaio)!)
* Deletion of the default hourly schedule on RHEL 7/Fedora 19+
* Make Puppet Doc compliant with RDoc markup language
* Refactoring
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,5 +229,6 @@ Check the [puppetlabs_spec_helper](https://github.com/puppetlabs/puppetlabs_spec

* [Kim Stig Andersen](https://github.com/ksaio)
* [Joshua Hoblitt](https://github.com/jhoblitt)
* [Daniel Forsberg](https://github.com/jenkins101)

Features request and contributions are always welcome!
5 changes: 4 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
# mode in which yum-cron should perform (valid: 'check', 'download', 'apply')
# [*exclude*]
# packages to exclude from automatic update (array)
# [*yum_params*]
# any extra yum cmdline parameters like --disablerepo= (only supported on RHEL 5 & 6)
# [*notify_email*]
# enable email notifications (boolean)
# [*email_to*]
Expand Down Expand Up @@ -56,6 +58,7 @@
$keep_default_hourly = false,
$action = 'apply',
$exclude = [],
$yum_params = '',
$notify_email = true,
$email_to = 'root',
$email_from = 'root',
Expand All @@ -68,7 +71,7 @@
validate_bool($service_enable, $notify_email, $default_schedule, $keep_default_hourly)
validate_re($action, '^(check|download|apply)$', '$action must be either \'check\', \'download\' or \'apply\'')
validate_array($exclude)
validate_string($email_to, $email_from, $update_cmd)
validate_string($email_to, $email_from, $update_cmd, $yum_params)
if ($debug_level < -1) or ($debug_level > 10) { fail('$debug_level must be a number between -1 and 10') }
if ($error_level < 0) or ($error_level > 10) { fail('$error_level must be a number between 0 and 10') }
validate_re($update_cmd, '^(default|security|security-severity:Critical|minimal|minimal-security|minimal-security-severity:Critical)$', '$update_cmd must be either \'default\', \'security\', \'security-severity:Critical\', \'minimal\', \'minimal-security\' or \'minimal-security-severity:Critical\'')
Expand Down
5 changes: 4 additions & 1 deletion manifests/schedule.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
# mode in which yum-cron should perform (valid: 'check', 'download', 'apply')
# [*exclude*]
# packages to exclude from automatic update (array)
# [*yum_params*]
# any extra yum cmdline parameters like --disablerepo= (only supported on RHEL 5 & 6)
# [*notify_email*]
# enable email notifications (boolean)
# [*email_to*]
Expand Down Expand Up @@ -57,6 +59,7 @@
define yum_autoupdate::schedule (
$action = 'apply',
$exclude = [],
$yum_params = '',
$notify_email = true,
$email_to = 'root',
$email_from = 'root',
Expand All @@ -81,7 +84,7 @@
validate_re($action, '^(check|download|apply)$', '$action must be either \'check\', \'download\' or \'apply\'')
validate_array($exclude)
validate_bool($notify_email)
validate_string($email_to, $email_from, $update_cmd)
validate_string($email_to, $email_from, $update_cmd, $yum_params)
if ($debug_level < -1) or ($debug_level > 10) { fail('$debug_level must be a number between -1 and 10') }
if ($error_level < 0) or ($error_level > 10) { fail('$error_level must be a number between 0 and 10') }
validate_re($update_cmd, '^(default|security|security-severity:Critical|minimal|minimal-security|minimal-security-severity:Critical)$', '$update_cmd must be either \'default\', \'security\', \'security-severity:Critical\', \'minimal\', \'minimal-security\' or \'minimal-security-severity:Critical\'')
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"project_page": "https://github.com/antoineco/aco-yum_autoupdate",
"source": "git://github.com/antoineco/aco-yum_autoupdate.git",
"summary": "Puppet module for scheduled system updates on RHEL variants",
"version": "0.6.1",
"version": "0.6.2",
"tags": ["unattended","update","yum"],
"dependencies": [
{
Expand Down
2 changes: 1 addition & 1 deletion templates/conf/rhel5.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Managed by Puppet
# ******************

YUM_PARAMETER=<%= @exclude_real %>
YUM_PARAMETER=<% if ! @yum_params.empty? -%>"<%= @yum_params %> "<% end %><%= @exclude_real %>
CHECK_ONLY=<% if @action == 'check' -%>yes<% else -%>no<% end %>
DOWNLOAD_ONLY=<% if @action == 'download' -%>yes<% else -%>no<% end %>
ERROR_LEVEL=<%= @error_level %>
Expand Down
2 changes: 1 addition & 1 deletion templates/conf/rhel6.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Managed by Puppet
# ******************

YUM_PARAMETER=<%= @exclude_real %>
YUM_PARAMETER=<% if ! @yum_params.empty? -%>"<%= @yum_params %> "<% end %><%= @exclude_real %>
CHECK_ONLY=<% if @action == 'check' -%>yes<% else -%>no<% end %>
DOWNLOAD_ONLY=<% if @action == 'download' -%>yes<% else -%>no<% end %>
CHECK_FIRST=no
Expand Down