metcalfc/puppet-rpmrepos — pull request #1 by croomes (2014-02-24 02:44:36+00:00)
Title: Import gpg keys before creating repos

Another forge module (https://github.com/jonbrouse/puppet-couchdb) creates a dependency on epel:
```
class couchdb::package {
package { 'couchdb':
ensure => installed,
require => Yumrepo[ 'epel' ],
}
}
```
The repo resource is created before the keys are imported, so the install fails with:
```
GPG key retrieval failed: [Errno 14] Could not open/read file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
```
The key is imported later in the run, and the next run works. This moves the GPG import as a prereq to defining the repo.