jeff1evesque / drupal-demonstration

Drupal 7: automated build implementing vagrant, puppet, and selinux
Other
6 stars 2 forks source link

Remove GPG Key conflict in puppet build #532

Closed jeff1evesque closed 8 years ago

jeff1evesque commented 8 years ago

Our current vagrant up build, has the following error traceback:

...
==> default: Notice: /Stage[main]/Update_yum/Exec[update-yum]/returns: warning: /var/cache/yum/x86_64/7/puppetlabs-pc1/packages/puppet-agent-1.7.0-1.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID ef8d349f: NOKEY
==> default: Notice: /Stage[main]/Update_yum/Exec[update-yum]/returns: Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs-PC1
==> default: Notice: /Stage[main]/Update_yum/Exec[update-yum]/returns:
==> default: Notice: /Stage[main]/Update_yum/Exec[update-yum]/returns:
==> default: Notice: /Stage[main]/Update_yum/Exec[update-yum]/returns: The GPG keys listed for the "Puppet Labs PC1 Repository el 7 - x86_64" repository are already installed but they are not correct for this package.
==> default: Notice: /Stage[main]/Update_yum/Exec[update-yum]/returns: Check that the correct key URLs are configured for this repository.
==> default: Notice: /Stage[main]/Update_yum/Exec[update-yum]/returns:
==> default: Notice: /Stage[main]/Update_yum/Exec[update-yum]/returns:
==> default: Notice: /Stage[main]/Update_yum/Exec[update-yum]/returns:  Failing package is: puppet-agent-1.7.0-1.el7.x86_64
==> default: Notice: /Stage[main]/Update_yum/Exec[update-yum]/returns:  GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs-PC1
==> default: Error: yum -y update returned 1 instead of one of [0]
==> default: Error: /Stage[main]/Update_yum/Exec[update-yum]/returns: change from notrun to 0 failed: yum -y update returned 1 instead of one of [0]
...
jeff1evesque commented 8 years ago

The key for the puppetlabs repo has changed recently. Therefore, we may need to implement additional puppet directives, providing the following possible solution:

$ curl --remote-name --location https://yum.puppetlabs.com/RPM-GPG-KEY-puppet
$ gpg --keyid-format 0xLONG --with-fingerprint ./RPM-GPG-KEY-puppet
pub  4096R/0x7F438280EF8D349F 2016-08-18 Puppet, Inc. Release Key (Puppet, Inc. Release Key) <rel...@puppet.com>
      Key fingerprint = 6F6B 1550 9CF8 E59E 6E46  9F32 7F43 8280 EF8D 349F
sub  4096R/0xA2D80E04656674AE 2016-08-18 [expires: 2021-08-17]
$ rpm --import RPM-GPG-KEY-puppet
ehlxr commented 7 years ago

thx