Try to retire the site module: move site::aptrepo to base
[mirror/dsa-puppet.git] / modules / hardware / manifests / raid / proliant.pp
index 711703b..305cfc4 100644 (file)
@@ -1,10 +1,9 @@
 class hardware::raid::proliant {
-       if $::smartarraycontroller {
-               site::aptrepo { 'debian.restricted':
-                       url        => 'http://db.debian.org/debian-admin',
-                       suite      => "${::lsbdistcodename}-restricted",
-                       components => 'non-free',
+       if $::smartarraycontroller_hpsa or $::smartarraycontroller_cciss {
+               base::aptrepo { 'debian.restricted':
+                       ensure => absent,
                }
+               include debian_org::apt_restricted
 
                package { 'hpacucli':
                        ensure  => installed,
@@ -27,20 +26,25 @@ 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 {
+                       $cmd = $hostname ? {
+                               'lobos' => 'dsa-check-hpssacli --no-battery',
+                               'villa' => 'dsa-check-hpssacli --no-battery',
+                               'lw08'  => 'dsa-check-hpssacli --no-battery --ignore-cache',
+                               default => 'dsa-check-hpssacli'
+                       }
 
+                       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 ${cmd}
+                                       | EOF
+                       }
                }
+               file { '/etc/cron.d/puppet-nagios-hpsa': ensure => absent, }
        } else {
-               site::aptrepo { 'debian.restricted':
+               base::aptrepo { 'debian.restricted':
                        ensure => absent,
                }
        }