puzzle/ansible-rancher

Ansible module missing

Closed this issue · 4 comments

Hi there

Environment:

ansible 2.9.15
python 3.6.8
CentOS Stream release 8

The roles/rke_rancher_clusters/tasks/rancher.yml makes use of the k8s module. Although it should exist in Ansible 2.9, I had no such module available on my machine. In Ansible 2.10, that particular module was moved to community. I installed it with ansible-galaxy collection install community.kubernetes and changed the k8s in roles/rke_rancher_clusters/tasks/rancher.yml to community.kubernetes.k8s. However, community.kubernetes.k8s has a dependency on the oc module. Which was deprecated and got removed in 2.9. They say, one should use openshift_raw instead, which is eventually the same as community.kubernetes.k8s.

Target Servers are all CentOS7

How did you work around that?

Kind regards
Thomas

Looks like this works:

ansible-galaxy collection install kubernetes.core
pip3 install openshift

Hi @tuxpeople

How do you run ansible-playbook? Also inside a Pipenv?

pipenv shell --three
pipenv install
ansible-playbook ...

E.g. openshift should then already be installed automatically via the pipenv install command since it's configured here:

openshift = "*"

Regards,
Philip

I just added a README.md section regarding this "prerequisites": https://github.com/puzzle/ansible-rancher#prerequisites

I wasn't aware of pipenv. Thanks for pointing out and for adding it to the REDAME.md