]> git.openstreetmap.org Git - chef.git/commitdiff
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 92abdf65dfdc0c1665f0a346662a6105cb42f73d..de695cd870f58201417fc6b204234bac450d709c 100644 (file)
@@ -200,6 +200,8 @@ node[:kernel][:modules].each_key do |modname|
   when "aacraid"
     tools_packages << "arcconf"
     status_packages["aacraid-status"] ||= []
   when "aacraid"
     tools_packages << "arcconf"
     status_packages["aacraid-status"] ||= []
+  when "arcmsr"
+    tools_packages << "areca"
   end
 end
 
   end
 end
 
@@ -225,6 +227,22 @@ end
   end
 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
 ["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