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

apt_key module: Case insensitive presence checking

Right now key_present() is case sensitive, only uppercase key IDs work. By using "grep -i", lowercase IDs should work too.
This commit is contained in:
Danilo Bargen 2014-01-14 01:11:40 +01:00
parent ca05584495
commit 7436da08fe

View file

@ -124,7 +124,7 @@ def all_keys(module, keyring):
return results
def key_present(module, key_id):
(rc, out, err) = module.run_command("apt-key list | 2>&1 grep -q %s" % key_id)
(rc, out, err) = module.run_command("apt-key list | 2>&1 grep -i -q %s" % key_id)
return rc == 0
def download_key(module, url):