lobos and villa do not have a battery on their raid controller
authorAurelien Jarno <aurelien@aurel32.net>
Thu, 1 Feb 2018 23:51:23 +0000 (00:51 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Thu, 1 Feb 2018 23:51:23 +0000 (00:51 +0100)
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
modules/hardware/manifests/raid/proliant.pp

index a0ab33c..fab4520 100644 (file)
@@ -28,12 +28,22 @@ class hardware::raid::proliant {
                }
 
                if $::smartarraycontroller_hpsa {
-                       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
+                       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, }