From 009ad01933a07dee8dbbfc5cd1af6d0a889eddfe Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Mon, 25 Dec 2017 11:51:09 +0100 Subject: [PATCH] restart hp-health on bm-bl* if needed --- modules/hardware/manifests/fixes.pp | 13 +++++++++++++ modules/hardware/manifests/init.pp | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 modules/hardware/manifests/fixes.pp diff --git a/modules/hardware/manifests/fixes.pp b/modules/hardware/manifests/fixes.pp new file mode 100644 index 000000000..8e555e125 --- /dev/null +++ b/modules/hardware/manifests/fixes.pp @@ -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 + } + } + } +} diff --git a/modules/hardware/manifests/init.pp b/modules/hardware/manifests/init.pp index eb453183c..acb6c14b6 100644 --- a/modules/hardware/manifests/init.pp +++ b/modules/hardware/manifests/init.pp @@ -16,4 +16,6 @@ class hardware { } include hardware::sensors + + include hardware::fixes } -- 2.20.1