pythondev
pythondev

Reputation: 9

Ansible k8s_facts/info throws openshift client not installed while running a playbook to fetch pod status

I am trying to get the status of pods running on k8 cluster. I went through this document which states that - "Use the OpenShift Python client"

Does that mean Openshift python client needs to be installed on the Master of K8 cluster or on the machine where ansible is installed and ansible scripts being invoked?

( I have installed openshift client on the ansible server- however, still getting error that openshift client is not installed)

Upvotes: 0

Views: 89

Answers (1)

mdaniel
mdaniel

Reputation: 33231

I have installed openshift client on the ansible server- however, still getting error that openshift client is not installed

The answer is the same for every ansible module's dependency: it must be in the python that is configured as ansible_python_interpreter for the host against which that module is running. So, if your module is connecting to the k8s master, it must be in its python, if it's running against localhost, then it must be in the python you are using locally.

Be aware that "the python you are using locally" can be different from "the python that ansible is running under," especially if you have installed ansible via Homebrew or in its own virtualenv.

Upvotes: 1

Related Questions