Hi,
I installed passlib python like below :
- pip:
name: "passlib"
environment:
http_proxy: "{{ proxy.url }}:{{ proxy.port }}"
https_proxy: "{{ proxy.url }}:{{ proxy.port }}"
It works since many time.
I’ve a playbook to deploy configuration on DBServer, and execute the task above.
But since yesterday on some DBServer, i’ve got this error.
{
"exception": "Traceback (most recent call last):\n File \"/tmp/ansible_pip_payload_yosxm2nv/ansible_pip_payload.zip/ansible/modules/pip.py\", line 284, in <module>\n from packaging.requirements import Requirement as parse_requirement\nModuleNotFoundError: No module named 'packaging'\n",
"msg": "Failed to import the required Python library (packaging) on XXXXXXXXXgm's Python /usr/bin/python3.12. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter",
"invocation": {
"module_args": {
"name": [
"passlib"
],
"state": "present",
"virtualenv_site_packages": false,
"virtualenv_command": "virtualenv",
"editable": false,
"version": null,
"requirements": null,
"virtualenv": null,
"virtualenv_python": null,
"extra_args": null,
"chdir": null,
"executable": null,
"umask": null
}
},
"_ansible_no_log": false,
"attempts": 5,
"changed": false,
"item": "passlib",
"ansible_loop_var": "item",
"_ansible_item_label": "passlib"
}
This module is already installed on the DBServer
[root@XXXXXXXXX log]# pip3 install passlib
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Requirement already satisfied: passlib in /usr/local/lib/python3.6/site-packages
Do you know what’s wrong with my configuration please ?
Thanks for your help,
Matt