From f6c4492c52e0651dad2851149d194514ecdb5c1b Mon Sep 17 00:00:00 2001 From: jantari Date: Sun, 23 Apr 2023 19:27:00 +0200 Subject: [PATCH] avoid returning nested list --- plugins/lookup/bitwarden_secrets_manager.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plugins/lookup/bitwarden_secrets_manager.py b/plugins/lookup/bitwarden_secrets_manager.py index b1f09a6b1a..8f839c9275 100644 --- a/plugins/lookup/bitwarden_secrets_manager.py +++ b/plugins/lookup/bitwarden_secrets_manager.py @@ -64,9 +64,9 @@ EXAMPLES = """ RETURN = """ _raw: - description: List containing the secret JSON object. Guaranteed to be of length 1. + description: List containing one or more secrets. type: list - elements: raw + elements: dict """ from subprocess import Popen, PIPE @@ -112,10 +112,7 @@ class Bitwarden(object): out, err = self._run(params) - # This includes things that matched in different fields. - initial_matches = AnsibleJSONDecoder().raw_decode(out)[0] - - return [initial_matches] + return AnsibleJSONDecoder().raw_decode(out)[0] class LookupModule(LookupBase):