summaryrefslogtreecommitdiffstats
path: root/modules/smartmontools
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2018-11-15 03:26:49 -0500
committerJesse Luehrs <doy@tozt.net>2018-11-15 03:26:49 -0500
commitfd3a7e9f7abd929a9deb69b0282d95d34961ed0c (patch)
tree1e0055f66a7c68098875867f1091c482ea161a7b /modules/smartmontools
parentebbbabe8a4b2a2597470aee2b306a11573bd65f1 (diff)
downloadpuppet-tozt-fd3a7e9f7abd929a9deb69b0282d95d34961ed0c.tar.gz
puppet-tozt-fd3a7e9f7abd929a9deb69b0282d95d34961ed0c.zip
install smartd for hard disk monitoring
Diffstat (limited to 'modules/smartmontools')
-rw-r--r--modules/smartmontools/files/smartd.conf1
-rw-r--r--modules/smartmontools/manifests/init.pp18
2 files changed, 19 insertions, 0 deletions
diff --git a/modules/smartmontools/files/smartd.conf b/modules/smartmontools/files/smartd.conf
new file mode 100644
index 0000000..17e93c9
--- /dev/null
+++ b/modules/smartmontools/files/smartd.conf
@@ -0,0 +1 @@
+DEVICESCAN -s (S/../.././20|L/../../6/03)
diff --git a/modules/smartmontools/manifests/init.pp b/modules/smartmontools/manifests/init.pp
new file mode 100644
index 0000000..76bc09b
--- /dev/null
+++ b/modules/smartmontools/manifests/init.pp
@@ -0,0 +1,18 @@
+class smartmontools {
+ package { 'smartmontools':
+ ensure => installed;
+ }
+
+ file { '/etc/smartd.conf':
+ source => 'puppet:///modules/smartmontools/smartd.conf';
+ }
+
+ service { 'smartd':
+ enable => true,
+ ensure => running,
+ require => [
+ Package['smartmontools'],
+ File['/etc/smartd.conf'],
+ ]
+ }
+}