Install Areca CLI tools on machines with an Areca controller
authorTom Hughes <tom@compton.nu>
Fri, 13 Mar 2015 19:11:16 +0000 (19:11 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 13 Mar 2015 19:11:16 +0000 (19:11 +0000)
cookbooks/hardware/recipes/default.rb

index 92abdf6..de695cd 100644 (file)
@@ -200,6 +200,8 @@ node[:kernel][:modules].each_key do |modname|
   when "aacraid"
     tools_packages << "arcconf"
     status_packages["aacraid-status"] ||= []
+  when "arcmsr"
+    tools_packages << "areca"
   end
 end
 
@@ -225,6 +227,22 @@ end
   end
 end
 
+if tools_packages.include?("areca")
+  include_recipe "git"
+
+  git "/opt/areca" do
+    action :sync
+    repository "git://chef.openstreetmap.org/areca.git"
+    user "root"
+    group "root"
+  end
+else
+  directory "/opt/areca" do
+    action :delete
+    recursive true
+  end
+end
+
 ["cciss-vol-status", "mpt-status", "sas2ircu-status", "megaraid-status", "megaclisas-status", "aacraid-status"].each do |status_package|
   if status_packages.include?(status_package)
     package status_package