From: Peter Palfrader Date: Mon, 25 Dec 2017 10:51:09 +0000 (+0100) Subject: restart hp-health on bm-bl* if needed X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=009ad01933a07dee8dbbfc5cd1af6d0a889eddfe;p=mirror%2Fdsa-puppet.git restart hp-health on bm-bl* if needed --- 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 }