浏览代码

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 年之前
父节点
当前提交
c657742
共有 1 个文件被更改,包括 3 次插入2 次删除
  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"],
       }