restart hp-health on bm-bl* if needed
authorPeter Palfrader <peter@palfrader.org>
Mon, 25 Dec 2017 10:51:09 +0000 (11:51 +0100)
committerPeter Palfrader <peter@palfrader.org>
Mon, 25 Dec 2017 10:51:09 +0000 (11:51 +0100)
modules/hardware/manifests/fixes.pp [new file with mode: 0644]
modules/hardware/manifests/init.pp

diff --git a/modules/hardware/manifests/fixes.pp b/modules/hardware/manifests/fixes.pp
new file mode 100644 (file)
index 0000000..8e555e1
--- /dev/null
@@ -0,0 +1,13 @@
+class hardware::fixes {
+       case $::hostname {
+               bm-bl1,bm-bl2,bm-bl3,bm-bl4,bm-bl5,bm-bl6,bm-bl7,bm-bl8,bm-bl9,bm-bl10,bm-bl11,bm-bl12,bm-bl13,bm-bl14: {
+                       concat::fragment { 'dsa-puppet-stuff--hp-health':
+                               target => '/etc/cron.d/dsa-puppet-stuff',
+                               #order  => '100',
+                               content  => @(EOF)
+                                       @hourly root  (for i in `seq 1 5`; do timeout 45 hpasmcli -s help && break; sleep 5; service hp-health stop; sleep 5; service hp-health start; sleep 10; done) > /dev/null 2>/dev/null
+                                       | EOF
+                       }
+               }
+       }
+}
index eb45318..acb6c14 100644 (file)
@@ -16,4 +16,6 @@ class hardware {
        }
 
        include hardware::sensors
+
+       include hardware::fixes
 }