diff --git a/lib/ansible/modules/packaging/os/apt_key.py b/lib/ansible/modules/packaging/os/apt_key.py index 09679853f8f..ebcdc3aa4b9 100644 --- a/lib/ansible/modules/packaging/os/apt_key.py +++ b/lib/ansible/modules/packaging/os/apt_key.py @@ -132,7 +132,7 @@ def all_keys(module, keyring, short_format): results = [] lines = out.split('\n') for line in lines: - if line.startswith("pub"): + if line.startswith("pub") or line.startswith("sub"): tokens = line.split() code = tokens[1] (len_type, real_code) = code.split("/")