Fix rpm_key absent. (#31045)
When keyid is 8 charactes long, drop_key function cuts everything issuing an error: "package gpg-pubkey- is not installed"
This commit is contained in:
parent
2e4dcc9dda
commit
4337b7a777
1 changed files with 1 additions and 1 deletions
|
@ -183,7 +183,7 @@ class RpmKey(object):
|
|||
|
||||
def drop_key(self, keyid):
|
||||
if not self.module.check_mode:
|
||||
self.execute_command([self.rpm, '--erase', '--allmatches', "gpg-pubkey-%s" % keyid[8:].lower()])
|
||||
self.execute_command([self.rpm, '--erase', '--allmatches', "gpg-pubkey-%s" % keyid[-8:].lower()])
|
||||
|
||||
|
||||
def main():
|
||||
|
|
Loading…
Reference in a new issue