Browse Source

Allow the use of the same key in multiple sources

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.
Christian G. Warden 12 năm trước cách đây
mục cha
commit
c657742
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      manifests/source.pp

+ 3 - 2
manifests/source.pp

@@ -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"],
       }