lobos and villa do not have a battery on their raid controller
[mirror/dsa-puppet.git] / modules / hardware / manifests / raid / proliant.pp
index b8dca1a..fab4520 100644 (file)
@@ -27,18 +27,26 @@ class hardware::raid::proliant {
                        }
                }
 
-               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
-
+               if $::smartarraycontroller_hpsa {
+                       if $::hostname in [lobos,villa] {
+                               concat::fragment { 'dsa-puppet-stuff--nagios--dsa-check-hpssacli':
+                                       target => '/etc/cron.d/dsa-puppet-stuff',
+                                       order  => '020',
+                                       content  => @(EOF)
+                                               27 */2 * * * root sleep $(( $RANDOM \% 900 )); dsa-wrap-nagios-check dsa-check-hpssacli
+                                               | EOF
+                               }
+                       } else {
+                               concat::fragment { 'dsa-puppet-stuff--nagios--dsa-check-hpssacli':
+                                       target => '/etc/cron.d/dsa-puppet-stuff',
+                                       order  => '020',
+                                       content  => @(EOF)
+                                               27 */2 * * * root sleep $(( $RANDOM \% 900 )); dsa-wrap-nagios-check dsa-check-hpssacli --no-battery
+                                               | EOF
+                               }
+                       }
                }
+               file { '/etc/cron.d/puppet-nagios-hpsa': ensure => absent, }
        } else {
                site::aptrepo { 'debian.restricted':
                        ensure => absent,