12
13
14
15
16
17
18
19
20
21
|
# File 'manifests/rpm_gpg_key.pp', line 12
define epel::rpm_gpg_key ($path) {
# Given the path to a key, see if it is imported, if not, import it
exec { "import-${name}":
path => '/bin:/usr/bin:/sbin:/usr/sbin',
command => "rpm --import ${path}",
unless => "rpm -q gpg-pubkey-$(echo $(gpg -q --batch --with-colons --throw-keyids --keyid-format short < ${path}) | grep pub | cut -d ':' -f 5 | cut --characters=9- | tr '[A-Z]' '[a-z]')",
require => File[$path],
logoutput => 'on_failure',
}
}
|