-
Notifications
You must be signed in to change notification settings - Fork 381
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
ImportError: No module named hvac #561
Comments
Howdy @gowthamakanthan, I don't see any error output attached. If you can include some additional details I'd be happy to try to help sort out what is occurring. |
PATH can often get messed up with ansible if youre using a virtualenv. if you are using a venv, try:
|
Thank you for your reply. Please check below for the details:
Package list:
`pip list
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020.
Please upgrade your Python as Python 2.7 is no longer maintained. A future
version of pip will drop support for Python 2.7. More details about Python
2 support in pip, can be found at
https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Package Version
---------------------------- --------
ansible 2.7.10
ansible-modules-hashivault 4.2.3
Babel 0.9.6
backports.ssl-match-hostname 3.5.0.1
certifi 2019.3.9
cffi 1.6.0
chardet 3.0.4
configobj 4.7.2
cryptography 1.7.2
decorator 3.4.0
enum34 1.0.4
httplib2 0.9.2
hvac 0.10.0`
Error:
`The full traceback is:
Traceback (most recent call last):
File "<stdin>", line 113, in <module>
File "<stdin>", line 105, in _ansiballz_main
File "<stdin>", line 48, in invoke_module
File "/tmp/ansible_hashivault_secret_engine_payload_kRLFx4/__main__.py",
line 2, in <module>
File
"/tmp/ansible_hashivault_secret_engine_payload_kRLFx4/ansible_hashivault_secret_engine_payload.zip/ansible/module_utils/hashivault.py",
line 4, in <module>
ImportError: No module named hvac
fatal: [10.9.123.21]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File
\"<stdin>\", line 113, in <module>\n File \"<stdin>\", line 105, in
_ansiballz_main\n File \"<stdin>\", line 48, in invoke_module\n File
\"/tmp/ansible_hashivault_secret_engine_payload_kRLFx4/__main__.py\", line
2, in <module>\n File
\"/tmp/ansible_hashivault_secret_engine_payload_kRLFx4/ansible_hashivault_secret_engine_payload.zip/ansible/module_utils/hashivault.py\",
line 4, in <module>\nImportError: No module named hvac\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}`
---
Best regards,
Gowtham
07798838879
=====================
Learn from mistakes....
Please consider the environment before printing this email - Thanks
…On Thu, Feb 27, 2020 at 3:26 PM Jeffrey Hogan ***@***.***> wrote:
Howdy @gowthamakanthan <https://github.com/gowthamakanthan>, I don't see
any error output attached. If you can include some additional details I'd
be happy to try to help sort out what is occurring.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#561?email_source=notifications&email_token=AA66HLRR47VZGSB5WZGIKITRE7LTJA5CNFSM4K4ZHLOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENEYA5A#issuecomment-592019572>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA66HLSHZBW4KU4M44C3DODRE7LTJANCNFSM4K4ZHLOA>
.
|
let me know what you think from my comment. also please be advised that python 2 is no longer a supported language, you should migrate to python3 asap: https://www.infoq.com/news/2019/09/python-2-end-of-life-approaching/ |
Yeah just had the same issue @gowthamakanthan . The problem is lack of the package on a remote machine not your host. This should fix it assuming package/pip versions match your environment:
|
Team,
I have installed "ansible-modules-hashivault", "hvac" using pip. And created a playbook to enable a secret. Getting below import error. Have validated the packages list in the pip and all the packages are installed. I am using python 2.7. Any leads?
The text was updated successfully, but these errors were encountered: