Hi,
We have implemented a custom lookup plugin in Ansible that includes a certificate validation feature.
To perform the certificate validation, we are using the Python cryptography module. However, during the Ansible sanity tests, we are encountering the following error, causing the tests to fail:
Error:
ERROR: Found 1 import issue(s) on Python 3.12 that need to be resolved:
ERROR: plugins/lookup/test.py:170:0: traceback: ModuleNotFoundError: No module named ‘cryptography’
Modules used in the code:
from cryptography.x509 import load_pem_x509_certificate
from cryptography.hazmat.backends import default_backend
The cryptography module is already available in the Python environment, but it seems that the Ansible sanity tests are unable to recognize it.
Could you please assist me in resolving this issue?