Try to retire the site module: move site::aptrepo to base
[mirror/dsa-puppet.git] / modules / hardware / manifests / raid / proliant.pp
1 class hardware::raid::proliant {
2         if $::smartarraycontroller_hpsa or $::smartarraycontroller_cciss {
3                 base::aptrepo { 'debian.restricted':
4                         ensure => absent,
5                 }
6                 include debian_org::apt_restricted
7
8                 package { 'hpacucli':
9                         ensure  => installed,
10                         tag    => extra_repo,
11                 }
12                 package { 'hpssacli':
13                         ensure  => installed,
14                         tag    => extra_repo,
15                 }
16                 if !("$::systemproductname" in ["ProLiant DL180 G5", "ProLiant DL120 G5", "ProLiant ML150 G5"]) {
17                         package { 'hp-health':
18                                 ensure => installed,
19                                 tag    => extra_repo,
20                         }
21                 }
22
23                 if $::debarchitecture == 'amd64' {
24                         package { 'lib32gcc1':
25                                 ensure => installed,
26                         }
27                 }
28
29                 if $::smartarraycontroller_hpsa {
30                         $cmd = $hostname ? {
31                                 'lobos' => 'dsa-check-hpssacli --no-battery',
32                                 'villa' => 'dsa-check-hpssacli --no-battery',
33                                 'lw08'  => 'dsa-check-hpssacli --no-battery --ignore-cache',
34                                 default => 'dsa-check-hpssacli'
35                         }
36
37                         concat::fragment { 'dsa-puppet-stuff--nagios--dsa-check-hpssacli':
38                                 target => '/etc/cron.d/dsa-puppet-stuff',
39                                 order  => '020',
40                                 content  => @("EOF")
41                                         27 */2 * * * root sleep $(( RANDOM \% 900 )); dsa-wrap-nagios-check ${cmd}
42                                         | EOF
43                         }
44                 }
45                 file { '/etc/cron.d/puppet-nagios-hpsa': ensure => absent, }
46         } else {
47                 base::aptrepo { 'debian.restricted':
48                         ensure => absent,
49                 }
50         }
51 }