run dsa-check-hpssacli out of cron on smartarraycontroller_hpsa hosts
authorPeter Palfrader <peter@palfrader.org>
Mon, 28 Aug 2017 11:49:37 +0000 (13:49 +0200)
committerPeter Palfrader <peter@palfrader.org>
Mon, 28 Aug 2017 11:49:37 +0000 (13:49 +0200)
modules/hardware/manifests/raid/proliant.pp

index a19ec28..711703b 100644 (file)
@@ -26,6 +26,19 @@ class hardware::raid::proliant {
                                ensure => installed,
                        }
                }
+
+               file { '/etc/cron.d/puppet-nagios-hpsa':
+                       ensure => ($::smartarraycontroller_hpsa) ? {
+                               true    => 'present',
+                               default => 'absent'
+                       },
+                       content  => @(EOF)
+                               SHELL=/bin/bash
+                               PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/nagios/plugins
+                               42 * * * 0 root sleep $(( $RANDOM \% 900 )); dsa-wrap-nagios-check dsa-check-hpssacli
+                               | EOF
+
+               }
        } else {
                site::aptrepo { 'debian.restricted':
                        ensure => absent,