How to use / install Ansible collections - Content has no field named 'owner' and sorry, community.kubernetes was not found How to use / install Ansible collections - Content has no field named 'owner' and sorry, community.kubernetes was not found kubernetes kubernetes

How to use / install Ansible collections - Content has no field named 'owner' and sorry, community.kubernetes was not found


Collections require Ansible 2.9.*


You'll need a newer version of Ansible to get that feature. (v2.9 or above).

$ ansible --versionansible 2.8.6        # This version doesn't support collections!

However, the upgrade process can be a little difficult. You may see this error:

### ERROR ###Upgrading directly from ansible-2.9 or less to ansible-2.10 or greater with pip isknown to cause problems.  Please uninstall the old version found at:/home/username/.local/lib/python3.8/site-packages/ansible/__init__.pyand install the new version:    pip uninstall ansible    pip install ansibleIf you have a broken installation, perhaps because ansible-base was installed beforeansible was upgraded, try this to resolve it:    pip install --force-reinstall ansible ansible-base

So, it's probably a good idea to follow those commands:

pip uninstall ansiblepip install ansible# Then check the version, and install your collectionansible --versionansible-galaxy collection install community.mycollectionname