Merge pull request #7949 from hacosta/apt_key
Check at most 16 characters of the key. Fixes #7936
This commit is contained in:
commit
f03d4e5bc7
1 changed files with 1 additions and 1 deletions
|
@ -254,7 +254,7 @@ def main():
|
||||||
keys2 = all_keys(module, keyring, short_format)
|
keys2 = all_keys(module, keyring, short_format)
|
||||||
if len(keys) != len(keys2):
|
if len(keys) != len(keys2):
|
||||||
changed=True
|
changed=True
|
||||||
if key_id and not key_id in keys2:
|
if key_id and not key_id[-16:] in keys2:
|
||||||
module.fail_json(msg="key does not seem to have been added", id=key_id)
|
module.fail_json(msg="key does not seem to have been added", id=key_id)
|
||||||
module.exit_json(changed=changed)
|
module.exit_json(changed=changed)
|
||||||
elif state == 'absent':
|
elif state == 'absent':
|
||||||
|
|
Loading…
Reference in a new issue