From 8d9221fcc5a2b4167c582e9e0d9be1fbd171bd0f Mon Sep 17 00:00:00 2001 From: Brian Scholer <1260690+briantist@users.noreply.github.com> Date: Sun, 28 Aug 2022 15:47:24 -0400 Subject: [PATCH] update vault_login --- plugins/lookup/vault_login.py | 3 ++- plugins/modules/vault_login.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/lookup/vault_login.py b/plugins/lookup/vault_login.py index 08980ecaa..6d255ac43 100644 --- a/plugins/lookup/vault_login.py +++ b/plugins/lookup/vault_login.py @@ -31,6 +31,7 @@ - "The C(token) auth method will only return full information if I(token_validate=True). If the token does not have the C(lookup-self) capability, this will fail. If I(token_validate=False), only the token value itself will be returned in the structure." + - I(revoke_ephemeral_token) has no effect in this lookup, since the token is the desired result. extends_documentation_fragment: - community.hashi_vault.connection - community.hashi_vault.connection.plugins @@ -135,7 +136,7 @@ def run(self, terms, variables=None, **kwargs): try: self.authenticator.validate() - response = self.authenticator.authenticate(client) + response = self.authenticator.authenticate(client).raw except (NotImplementedError, HashiVaultValueError) as e: raise AnsibleError(e) diff --git a/plugins/modules/vault_login.py b/plugins/modules/vault_login.py index 0cc411cec..89b25e201 100644 --- a/plugins/modules/vault_login.py +++ b/plugins/modules/vault_login.py @@ -39,6 +39,7 @@ - "In check mode, this module will not perform a login, and will instead return a basic structure with an empty token. However this may not be useful if the token is required for follow on tasks. It may be better to use this module with C(check_mode=no) in order to have a valid token that can be used." + - I(revoke_ephemeral_token) has no effect in this module, since the token is the desired result. options: token_validate: description: @@ -160,7 +161,7 @@ def run_module(): if module.check_mode: response = {'auth': {'client_token': None}} else: - response = module.authenticator.authenticate(client) + response = module.authenticator.authenticate(client).raw except (NotImplementedError, HashiVaultValueError) as e: module.fail_json(msg=to_native(e), exception=traceback.format_exc())