2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'manifests/plugin/smart.pp', line 2
class collectd::plugin::smart (
Array $disks = [],
$ensure = 'present',
Boolean $ignoreselected = false,
$interval = undef,
$manage_package = undef,
$package_name = 'collectd-smart',
) {
include collectd
if $facts['os']['family'] == 'RedHat' {
if $manage_package != undef {
$_manage_package = $manage_package
} else {
if versioncmp($collectd::collectd_version_real, '5.5') >= 0 {
$_manage_package = true
} else {
$_manage_package = false
}
}
if $_manage_package {
package { 'collectd-smart':
ensure => $ensure,
name => $package_name,
}
}
}
collectd::plugin { 'smart':
ensure => $ensure,
content => template('collectd/plugin/smart.conf.erb'),
interval => $interval,
}
}
|