Commit 7436da08 by Danilo Bargen

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.
parent ca055844
......@@ -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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment