Suggest different variables to use if we want to tunnel both v4 and v6
[mirror/dsa-puppet.git] / modules / hardware / manifests / raid / megaraid_sas.pp
index 8594709..f208682 100644 (file)
@@ -1,13 +1,24 @@
 class hardware::raid::megaraid_sas {
-       if $::megaraid_sas {
-               site::aptrepo { 'debian.restricted':
-                       url        => 'http://db.debian.org/debian-admin',
-                       suite      => 'stretch-restricted',
-                       components => 'non-free',
-               }
+       if ($::megaraid_sas and $::debarchitecture == "amd64") {
+               include debian_org::apt_restricted
 
                package { 'megacli':
                        ensure  => installed,
                }
+
+               file { '/usr/local/sbin/megacli':
+                       ensure => 'link',
+                       target => '/opt/MegaRAID/MegaCli/MegaCli64',
+               }
+       } else {
+               package { 'megacli':
+                       ensure  => purged,
+               }
+               file { '/usr/local/sbin/megacli':
+                       ensure => 'absent',
+               }
+       }
+       base::aptrepo { 'debian.restricted.megaraid_sas':
+               ensure => absent,
        }
 }