serverdensity/puppet-serverdensity — pull request #17 by burner1024 (2014-01-07 16:08:30+00:00)
Title: Fix yum repo key import

There's a number of problem with the way the module imports GPG key into RPM database:

1) It uses wget. Almost all machines have wget. But those that haven't probably have a specific reason for that, so one shouldn't be forced to use it.
2) It manages wget package. Sorry, but we manage common packages in other modules. This results in conflict (duplicate declarations).
3) it uses "sudo rpm" for import:
- there's no need for for sudo, since Puppet runs as root
- it doesn't even work, because by default sudo requires tty on Centos
4) It downloads and imports the key EVERY single Puppet run. (And on the top of that, it somehow leads to sd-agent being restarted every time) There's no justification for it.

So, here I added the GPG key to the module, removed any wget references for yum, and fixed import so it actually works and only a single time, when it's needed (on GPG key update)