Skip to content

Commit

Permalink
rename class smartd param $scan -> $devicescan
Browse files Browse the repository at this point in the history
it's slightly better 'self documenting' if the class params match the configuration file directives
  • Loading branch information
Joshua Hoblitt committed Apr 25, 2013
1 parent 0b3f1b9 commit 58887e2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions manifests/defaults.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
$autoupdate = false
$package_name = 'smartmontools'
$service_name = 'smartd'
$scan = true
$devicescan = true
$devicescan_options = false
$devices = []
$device_opts = {}
$mail_to = 'root'
$warning_schedule = 'daily' # other choices: once, diminishing
$enable_monit = false
$devicescan_options = false

case $::osfamily {
'FreeBSD': {
Expand Down
4 changes: 2 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
$package_name = $smartd::defaults::package_name,
$service_name = $smartd::defaults::service_name,
$config_file = $smartd::defaults::config_file,
$scan = $smartd::defaults::scan,
$devicescan = $smartd::defaults::devicescan,
$devicescan_options = $smartd::defaults::devicescan_options,
$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 {
'present': {
Expand Down
2 changes: 1 addition & 1 deletion templates/smartd.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Managed by Puppet -- do not edit!
DEFAULT -m <%= @mail_to %> -M <%= @warning_schedule %>
<% if @scan -%>
<% if @devicescan -%>
DEVICESCAN <% if @devicescan_options %><%= @devicescan_options %><% end %>
<% end -%>
<% @devices.each do |device| -%>
Expand Down

0 comments on commit 58887e2

Please sign in to comment.