and symlink
[mirror/dsa-puppet.git] / modules / hardware / manifests / raid / megaraid_sas.pp
1 class hardware::raid::megaraid_sas {
2         if $::megaraid_sas {
3                 site::aptrepo { 'debian.restricted.megaraid_sas':
4                         url        => 'http://db.debian.org/debian-admin',
5                         suite      => 'stretch-restricted',
6                         components => 'non-free',
7                 }
8
9                 package { 'megacli':
10                         ensure  => installed,
11                 }
12
13                 file { '/usr/local/sbin/megacli':
14                         ensure => 'link',
15                         target => '/opt/MegaRAID/MegaCli/MegaCli64',
16                 }
17         } else {
18                 site::aptrepo { 'debian.restricted.megaraid_sas':
19                         ensure => absent,
20                 }
21                 package { 'megacli':
22                         ensure  => purged,
23                 }
24                 file { '/usr/local/sbin/megacli':
25                         ensure => 'absent',
26                 }
27         }
28 }