Added importing of rpm gpg keys when adding new repositories.

This commit is contained in:
Timo Mkinen 2012-06-13 16:35:51 +03:00
parent f2909fd1c4
commit 0b35ba1470

View file

@ -142,6 +142,12 @@ define yum::repo($baseurl="", $mirrorlist="", $descr="", $gpgkey="") {
owner => "root",
group => "root",
before => File["/etc/yum.repos.d/${name}.repo"],
notify => Exec["rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-${name}"],
}
exec { "rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-${name}":
path => "/bin:/usr/bin:/sbin:/usr/sbin",
user => "root",
refreshonly => true,
}
$gpgkey_real = "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-${name}"
} else {