]> gitweb.fluxo.info Git - puppet-apt.git/commitdiff
add $custom_key_dir which lets you specify a directory where you will
authorMicah Anderson <micah@riseup.net>
Mon, 29 Sep 2008 16:12:31 +0000 (12:12 -0400)
committerMicah Anderson <micah@riseup.net>
Mon, 29 Sep 2008 16:12:31 +0000 (12:12 -0400)
place apt repository keys that should be added to apt-key

manifests/init.pp

index a5428875dbbfac52ece8a69c2c3724ee2010b885..256c56e9209b381fc97bcd0b98dd6354cdec0761 100644 (file)
@@ -115,7 +115,23 @@ class apt {
                  }
                }
        }
+
+        case $custom_key_dir {
+          default: {
+            file { "${apt_base_dir}/keys.d":
+              source => "$custom_key_dir",
+              recurse => yes,
+              mode => 0755, owner => root, group => root,
+            }
+            exec { "for key in `ls ${apt_base_dir/keys.d/` ; do /usr/bin/apt-key add ${apt_base_dir}/$key && apt-get update":
+              alias => "custom_keys",
+              refreshonly => true,
+              before => File[apt_config];
+            }
+          }
+        }
 }
+        
 
 class dselect {
        # suppress annoying help texts of dselect