Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hashivault_token_renew: call to client.renew_self_token not working anymore #468

Open
ThomasAusweger opened this issue Feb 20, 2024 · 0 comments

Comments

@ThomasAusweger
Copy link

ThomasAusweger commented Feb 20, 2024

The code line https://github.com/TerryHowe/ansible-modules-hashivault/blob/main/ansible/modules/hashivault/hashivault_token_renew.py#L68 is not valid anymore.

In the HVAC change the function was moved https://hvac.readthedocs.io/en/stable/changelog.html#june-16th-2020

Old function https://hvac.readthedocs.io/en/stable/source/hvac_v1.html#hvac.v1.Client.renew_token

The function moved to a different place:
https://hvac.readthedocs.io/en/stable/source/hvac_api_auth_methods.html#hvac.api.auth_methods.Token.renew_self

AttributeError: 'Client' has no attribute 'renew_self_token'. Did you mean: 'renew_token'?
fatal: [localhost]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):
File "/root/.ansible/tmp/ansible-tmp-1708424555.9978213-125-13163223647805/AnsiballZ_hashivault_token_renew.py", line 107, in
_ansiballz_main()
File "/root/.ansible/tmp/ansible-tmp-1708424555.9978213-125-13163223647805/AnsiballZ_hashivault_token_renew.py", line 99, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/root/.ansible/tmp/ansible-tmp-1708424555.9978213-125-13163223647805/AnsiballZ_hashivault_token_renew.py", line 47, in invoke_module
runpy.run_module(mod_name='ansible.modules.hashivault.hashivault_token_renew', init_globals=dict(_module_fqn='ansible.modules.hashivault.hashivault_token_renew', _modlib_path=modlib_path),
File "", line 226, in run_module
File "", line 98, in _run_module_code
File "", line 88, in _run_code
File "/tmp/ansible_hashivault_token_renew_payload_xm_lu8p4/ansible_hashivault_token_renew_payload.zip/ansible/modules/hashivault/hashivault_token_renew.py", line 75, in
File "/tmp/ansible_hashivault_token_renew_payload_xm_lu8p4/ansible_hashivault_token_renew_payload.zip/ansible/modules/hashivault/hashivault_token_renew.py", line 51, in main
File "/tmp/ansible_hashivault_token_renew_payload_xm_lu8p4/ansible_hashivault_token_renew_payload.zip/ansible/module_utils/hashivault.py", line 154, in wrapper
File "/tmp/ansible_hashivault_token_renew_payload_xm_lu8p4/ansible_hashivault_token_renew_payload.zip/ansible/modules/hashivault/hashivault_token_renew.py", line 68, in hashivault_token_renew
File "/usr/local/lib/python3.12/site-packages/hvac/v1/init.py", line 155, in getattr
return utils.getattr_with_deprecated_properties(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/hvac/utils.py", line 252, in getattr_with_deprecated_properties
raise AttributeError(
AttributeError: 'Client' has no attribute 'renew_self_token'. Did you mean: 'renew_token'?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant