diff --git a/changelogs/fragments/4964-fix-keyring-info.yml b/changelogs/fragments/4964-fix-keyring-info.yml new file mode 100644 index 0000000000..b10e8cc7cf --- /dev/null +++ b/changelogs/fragments/4964-fix-keyring-info.yml @@ -0,0 +1,2 @@ +bugfixes: + - "keyring_info - fix the result from the keyring library never getting returned (https://github.com/ansible-collections/community.general/pull/4964)." diff --git a/plugins/modules/system/keyring_info.py b/plugins/modules/system/keyring_info.py index 4d3e5ee995..3630842859 100644 --- a/plugins/modules/system/keyring_info.py +++ b/plugins/modules/system/keyring_info.py @@ -122,7 +122,9 @@ def run_module(): pass except AttributeError: pass - passphrase = _alternate_retrieval_method(module) + + if passphrase is None: + passphrase = _alternate_retrieval_method(module) if passphrase is not None: result["msg"] = "Successfully retrieved password for %s@%s" % (