I played around with the k8s plugin in Ansible and set up an according project on AWX. The playbook contains a task for creating an OpenShift namespace. My configured job aborted with an error:
"msg": "This module requires the OpenShift Python client. Try pip install openshift"
Due to user restrictions in OpenShift I'm not able to install the Python module manually.
- name: Create a k8s namespace
k8s:
host: <OPENSHIFT_HOST_IP>
username: <OPENSHIFT_USER>
password: <OPENSHIFT_PASSWORD>
name: sampleproject
api_version: v1
kind: Namespace
state: present
"msg": "This module requires the OpenShift Python client. Try pip install openshift"At this time, we do not provide dependencies for the entire set of shipped-with-Ansible modules in the environment. (If I'm recalling right, doing so would actually lead to python conflicts).
The normal way to do this is to create a custom image with a virtual environment that contains the updated python libraries.
However, in the case of running in OpenShift, it may be considered expected that the ability to talk to openshift would be there. We can look at it.
Most helpful comment
At this time, we do not provide dependencies for the entire set of shipped-with-Ansible modules in the environment. (If I'm recalling right, doing so would actually lead to python conflicts).
The normal way to do this is to create a custom image with a virtual environment that contains the updated python libraries.
However, in the case of running in OpenShift, it may be considered expected that the ability to talk to openshift would be there. We can look at it.