]> git.openstreetmap.org Git - chef.git/commitdiff
Add support for the hwraid apt repository
authorTom Hughes <tom@compton.nu>
Tue, 25 Jun 2013 19:43:45 +0000 (20:43 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 25 Jun 2013 19:43:45 +0000 (20:43 +0100)
cookbooks/apt/definitions/apt_source.rb
cookbooks/apt/recipes/default.rb

index c109707a9cbb6ae8cff6f04c95625365db83b7ba..f98b2b22c55a0188448ecc919ca1c4f1d2595e1d 100644 (file)
@@ -21,9 +21,11 @@ define :apt_source do
   if node.apt.sources.include?(params[:name])
     source_action = :create
 
   if node.apt.sources.include?(params[:name])
     source_action = :create
 
-    execute "apt-key-#{params[:key]}" do
-      command "/usr/bin/apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys #{params[:key]}"
-      not_if "/usr/bin/apt-key list | /bin/fgrep -q #{params[:key]}"
+    if params[:key]
+      execute "apt-key-#{params[:key]}" do
+        command "/usr/bin/apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys #{params[:key]}"
+        not_if "/usr/bin/apt-key list | /bin/fgrep -q #{params[:key]}"
+      end
     end
   else
     source_action = :delete
     end
   else
     source_action = :delete
index 4b5fdf7a7f996121d165cf9f776a0aa650d47e12..5756e0396714508d9ea154cfb915b16faafe15b3 100644 (file)
@@ -100,6 +100,10 @@ apt_source "management-component-pack" do
   key "2689B887"
 end
 
   key "2689B887"
 end
 
+apt_source "hwraid" do
+  url "http://hwraid.le-vert.net/ubuntu"
+end
+
 apt_source "mapnik-v210" do
   url "http://ppa.launchpad.net/mapnik/v2.1.0/ubuntu"
   key "5D50B6BA"
 apt_source "mapnik-v210" do
   url "http://ppa.launchpad.net/mapnik/v2.1.0/ubuntu"
   key "5D50B6BA"