1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Check at most 16 characters of the key. Fixes #7936

Signed-off-by: Hector Acosta <hector.acosta@gmail.com>
This commit is contained in:
Hector Acosta 2014-06-27 03:16:12 -05:00
parent 29434b06b8
commit f870120b3c

View file

@ -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':