i installed the community kubernetes collection (https://galaxy.ansible.com/community/kubernetes)
run ansible-galaxy collection install community.kubernetes on my ansible machine and have this task to use the module:
- name: Create a dashboard service account
kubernetes.core.k8s:
kubeconfig: "{{ hostvars['master'].kubeconfig }}"
state: present
resource_definition:
kind: ServiceAccount
apiVersion: v1
metadata:
name: admin-user
namespace: kubernetes-dashboard
and thats the output:
fatal: [master]: FAILED! => {"msg": "Could not find imported module support code for ansiblemodule. Looked for either AnsibleTurboModule.py or module.py"}
ansible version:
ansible 2.9.9
config file = /home/xx/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.7/dist-packages/ansible
executable location = /usr/local/bin/ansible
python version = 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0]
OS:
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
what do i need to fix this problem?
if you need more informations, let me know!