From 7436da08fe386693573920dc08ad0dfabf37d214 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Tue, 14 Jan 2014 01:11:40 +0100 Subject: [PATCH] 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. --- library/packaging/apt_key | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/packaging/apt_key b/library/packaging/apt_key index dee73762c6..eee8633702 100644 --- a/library/packaging/apt_key +++ b/library/packaging/apt_key @@ -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):