From 35ca6d535b63e284e57004d39248afc3d4c6316e Mon Sep 17 00:00:00 2001 From: Hector Acosta Date: Fri, 27 Jun 2014 03:16:12 -0500 Subject: [PATCH] Check at most 16 characters of the key. Fixes #7936 Signed-off-by: Hector Acosta --- packaging/apt_key | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/apt_key b/packaging/apt_key index 7c1ba2e265b..0a483a97bbc 100644 --- a/packaging/apt_key +++ b/packaging/apt_key @@ -254,7 +254,7 @@ def main(): keys2 = all_keys(module, keyring, short_format) if len(keys) != len(keys2): 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.exit_json(changed=changed) elif state == 'absent':