summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--manifests/partofme.pp1
-rw-r--r--modules/partofme/monitoring.pp3
-rw-r--r--modules/smartmontools/files/smartd.conf1
-rw-r--r--modules/smartmontools/manifests/init.pp18
4 files changed, 23 insertions, 0 deletions
diff --git a/manifests/partofme.pp b/manifests/partofme.pp
index 7951601..5390bbd 100644
--- a/manifests/partofme.pp
+++ b/manifests/partofme.pp
@@ -5,4 +5,5 @@ node 'partofme.localdomain' {
include partofme::backups
include partofme::filesharing
+ include partofme::monitoring
}
diff --git a/modules/partofme/monitoring.pp b/modules/partofme/monitoring.pp
new file mode 100644
index 0000000..f03d36e
--- /dev/null
+++ b/modules/partofme/monitoring.pp
@@ -0,0 +1,3 @@
+class partofme::monitoring {
+ include smartmontools
+}
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'],
+ ]
+ }
+}