Sfoglia il codice sorgente

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 anni fa
parent
commit
c657742
1 ha cambiato i file con 3 aggiunte e 2 eliminazioni
  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"],
       }