1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix keyring_info when using keyring library (#4964)

* Fix keyring_info when using keyring library

This line used to always clobber the passphrase retrieved via the `keyring` library, making it useless on everything except gnome-keyring. After this change, it'll only use the alternate method if the default one didn't work.

* delete whitespace

* add changelog fragment

* Update changelogs/fragments/4964-fix-keyring-info.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Sargun Vohra 2022-07-24 03:08:12 -07:00 committed by GitHub
parent 3204905e5c
commit e2426707e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -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)."

View file

@ -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" % (