|
|
@ -141,7 +141,14 @@ class RpmKey:
|
|
|
|
return ret
|
|
|
|
return ret
|
|
|
|
|
|
|
|
|
|
|
|
def getkeyid(self, keyfile):
|
|
|
|
def getkeyid(self, keyfile):
|
|
|
|
gpg = self.module.get_bin_path('gpg', True)
|
|
|
|
|
|
|
|
|
|
|
|
gpg = self.module.get_bin_path('gpg')
|
|
|
|
|
|
|
|
if not gpg:
|
|
|
|
|
|
|
|
gpg = self.module.get_bin_path('gpg2')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if not gpg:
|
|
|
|
|
|
|
|
self.json_fail(msg="rpm_key requires a command lne gpg or gpg2, none found")
|
|
|
|
|
|
|
|
|
|
|
|
stdout, stderr = self.execute_command([gpg, '--no-tty', '--batch', '--with-colons', '--fixed-list-mode', '--list-packets', keyfile])
|
|
|
|
stdout, stderr = self.execute_command([gpg, '--no-tty', '--batch', '--with-colons', '--fixed-list-mode', '--list-packets', keyfile])
|
|
|
|
for line in stdout.splitlines():
|
|
|
|
for line in stdout.splitlines():
|
|
|
|
line = line.strip()
|
|
|
|
line = line.strip()
|
|
|
|