-
Notifications
You must be signed in to change notification settings - Fork 89
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
cryptography python module not found when using community.crypto #762
Comments
You need to install the |
I just noticed in the debug output that Python2.7 is being used: How is this possible when the EE is CentOS Stream 9 with Python3.9 installed? The whole purpose of the EE is to execute within that environment. |
If you ask Ansible to run the task on a remote target, then it won't be run inside the EE, but on the remote target. If you want to run the module in the EE, you have to use |
I made the adjustments and now it fails because the path to the certificate is not on the localhost (the EE)...this is seems to be a paradox.
Error:
|
Well, if you want to operate on files on the remote, you either first have to fetch them to the controller, or you have to run the module on the target - but then you have to make sure that the module's requirements are available. |
Okay, then assuming it is not feasible to install the cryptography python module on every single remote host in the inventory AND using |
I don't see what the difference between CLI Ansible and AWX/Tower is. In both cases, installing on the controller is easier than installing on all remotes, and you can determine yourself whether to run on the controller or on the targets. |
I'm encountering an issue similar to this on Rocky Linux 9 (works fine on Ubuntu 22.04 and Debian 12) where
Debug output from:
...indicates
Overriding |
Yes, that's exactly it. You need to point |
I don't encounter this additional configuration requirement with Ubuntu or Debian, but I'll have to double check to verify. If that output is interesting, I can post it here. |
You probably already have cryptography installed on system level on Debian and Ubuntu, and thus don't notice that it does not use the cryptography you explicitly installed but the system one. |
SUMMARY
Built AWX EE from https://github.com/Frewx/awx-ee-builder.git.
Defined "quay.io/ansible/awx-ee:latest" in execution-environment.yml for base_image.
Included "cryptography" in requirements.txt.
Included "community.general" (latest) and "community.crypto" (latest) in requirements.yml.
When executing a simple task via AWX, the following error occurs:
"Cannot detect any of the required Python libraries cryptography (>= 1.6)"
ISSUE TYPE
COMPONENT NAME
community.crypto.x509_certificate_info
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
quay.io/ansible/awx-ee:latest based on CentOS Stream release 9
STEPS TO REPRODUCE
Deploy EE based on the settings posted above. Setup EE in AWX (24.3.1) and execute simple playbook against target host.
EXPECTED RESULTS
That the information about a certificate would return
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: