Skip to content

Commit

Permalink
rename class smartd param $schedule -> $warning_schedule to silence w…
Browse files Browse the repository at this point in the history
…arning

Warning: schedule is a metaparam; this value will inherit to all contained resources in the smartd definition
  • Loading branch information
Joshua Hoblitt committed Apr 25, 2013
1 parent 89c55ce commit 0b3f1b9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
18 changes: 9 additions & 9 deletions manifests/defaults.pp
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
class smartd::defaults {
$autoupdate = false
$package_name = 'smartmontools'
$service_name = 'smartd'
$scan = true
$devices = []
$device_opts = {}
$mail_to = 'root'
$schedule = 'daily' # other choices: once, diminishing
$enable_monit = false
$autoupdate = false
$package_name = 'smartmontools'
$service_name = 'smartd'
$scan = true
$devices = []
$device_opts = {}
$mail_to = 'root'
$warning_schedule = 'daily' # other choices: once, diminishing
$enable_monit = false
$devicescan_options = false

case $::osfamily {
Expand Down
20 changes: 10 additions & 10 deletions manifests/init.pp
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
class smartd ($ensure = 'present',
$autoupdate = $smartd::defaults::autoupdate,
$package_name = $smartd::defaults::package_name,
$service_name = $smartd::defaults::service_name,
$config_file = $smartd::defaults::config_file,
$scan = $smartd::defaults::scan,
$devices = $smartd::defaults::devices,
$device_opts = $smartd::defaults::device_opts,
$mail_to = $smartd::defaults::mail_to,
$schedule = $smartd::defaults::schedule,
$enable_monit = $smartd::defaults::enable_monit,
$autoupdate = $smartd::defaults::autoupdate,
$package_name = $smartd::defaults::package_name,
$service_name = $smartd::defaults::service_name,
$config_file = $smartd::defaults::config_file,
$scan = $smartd::defaults::scan,
$devices = $smartd::defaults::devices,
$device_opts = $smartd::defaults::device_opts,
$mail_to = $smartd::defaults::mail_to,
$warning_schedule = $smartd::defaults::warning_schedule,
$enable_monit = $smartd::defaults::enable_monit,
$devicescan_options = $smartd::defaults::devicescan_options,
) inherits smartd::defaults {
case $ensure {
Expand Down
2 changes: 1 addition & 1 deletion templates/smartd.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Managed by Puppet -- do not edit!
DEFAULT -m <%= @mail_to %> -M <%= @schedule %>
DEFAULT -m <%= @mail_to %> -M <%= @warning_schedule %>
<% if @scan -%>
DEVICESCAN <% if @devicescan_options %><%= @devicescan_options %><% end %>
<% end -%>
Expand Down

0 comments on commit 0b3f1b9

Please sign in to comment.