Closed nergalex closed 4 years ago
Failed to import the required Python library (openshift) on towerrhel's Python /usr/bin/python.
It looks like the primary issue is the openshift Python library is not installed on the machine where the playbook runs. It should be installed with pip install openshift
If you install that library, it depends on the kubernetes
library, which depends on google-auth
, which would then be installed (see requirements.txt).
openshift
package is well installed but during module import, google
package is not found. In detailed_job_output.txt
, you will find the detailed error:
File \"/opt/custom-envs/cloudbuilder-collection/lib/python2.7/site-packages/kubernetes/config/kube_config.py\", line 29, in <module>
from google import auth
ImportError: No module named google
@nergalex Understood, but all of the things you are reporting -- Ansible Tower custom environment and the installation of the python openshift client library -- are outside of the scope of this project. Have you contacted Red Hat support on this?
OK I will Thank you for your answer
SUMMARY
CONTEXT first install and play with
community.kubernetes collection
. It doesn't work before. (see attached playbookget_test.yaml
)SYMPTOM job output
No module named google.auth
(see attached file job_24196_output.txt)WORKAROUND add
__init__.py
in packagegoogle
. File copied fromhttps://raw.githubusercontent.com/googleapis/google-auth-library-python/master/google/__init__.py
job_24196_output.txt get_test.yaml.TXTISSUE TYPE
COMPONENT NAME
community.kubernetes.k8s_info
ANSIBLE VERSION
CONFIGURATION
Tower 3.7.3
OS / ENVIRONMENT
STEPS TO REPRODUCE
create custom env
Play get_test.yaml with collection community.kubernetes 1.1.1 in requirements
EXPECTED RESULTS
With workaround: OK, it works.
ACTUAL RESULTS
See job_24196_output.txt