]> review.fuel-infra Code Review - puppet-modules/puppetlabs-apt.git/commitdiff
Allow the use of the same key in multiple sources
authorChristian G. Warden <cwarden@xerus.org>
Tue, 14 Feb 2012 19:40:29 +0000 (11:40 -0800)
committerChristian G. Warden <cwarden@xerus.org>
Tue, 14 Feb 2012 19:40:29 +0000 (11:40 -0800)
Allow the use of the same key in multiple sources by including the name
of the source in the declaration for the exec which adds the key.

manifests/source.pp

index 2bd2e42d5a0817973ecc1923eccfba7603b24024..0512fa96c9ac48440091843781d617ba9cf25cd9 100644 (file)
@@ -44,13 +44,14 @@ define apt::source(
 
   if $key != false {
     if $key_content {
-      exec { "Add key: ${key} from content":
+      exec { "Add key: ${key} from content for ${name}":
         command => "/bin/echo '${key_content}' | /usr/bin/apt-key add -",
         unless => "/usr/bin/apt-key list | /bin/grep '${key}'",
         before => File["${name}.list"],
       }
     } else {
-      exec { "/usr/bin/apt-key adv --keyserver ${key_server} --recv-keys ${key}":
+      exec { "Add key: ${key} from ${key_server} for ${name}":
+        command => "/usr/bin/apt-key adv --keyserver ${key_server} --recv-keys ${key}",
         unless => "/usr/bin/apt-key list | /bin/grep ${key}",
         before => File["${name}.list"],
       }