From: Christian G. Warden Date: Tue, 14 Feb 2012 19:40:29 +0000 (-0800) Subject: Allow the use of the same key in multiple sources X-Git-Tag: 0.0.1~9^2~2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=c65774204d7ab91f46f2aac243ec2650f2b39565;p=puppet-modules%2Fpuppetlabs-apt.git 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. --- diff --git a/manifests/source.pp b/manifests/source.pp index 2bd2e42..0512fa9 100644 --- a/manifests/source.pp +++ b/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"], }