Prepare for Ansible 2.10 and new Kubernetes Collection
I've been working on the Ansible Kubernetes Collection for a bit, and in Ansible 2.10, it will become the source of the k8s-related modules and plugins.
As such, there are a few parts of the book (and probably a number of playbooks) which should be tweaked to include the consumption and use of the community.kuberneteskubernetes.core collection.
Even though some of the modules that were in Ansible <= 2.9 may be included in a new Ansible distribution and work similar to how they did in older versions, all the examples in the book should directly consume the community.kuberneteskubernetes.core collection, to minimize surprises.
There may be other things that need to change, e.g. consuming the new aws collection (when it becomes available) for the AWS-related examples—and same goes for GCP and any other non-core collections.
Related in other book: https://github.com/geerlingguy/ansible-for-devops/issues/202
And a blog post about it: The Kubernetes Collection for Ansible.
Looking deeper into Ansible 2.10 and the 'ACD' (Ansible Community Distribution), which is what will be installed if you run pip install ansible, it looks like the way everything works will be the same, though I'm not yet certain if additional new modules will be able to be routed to the right place (e.g. new modules like k8s_exec, k8s_log, or coming helm modules...).
See the collection 'tombstoning/redirection' PR for some progress: https://github.com/ansible/ansible/pull/67684
@geerlingguy I am very thankful for all your continuing work on this great book. However I feel that readers would benefit from example on how to make a role dependant on the collection installed. I.e. I am using community.general.pear: to manage pear modules and this is a part of my php role. Do you need to let role have "Dependency: collection xyz" in meta/main.yml? Sorry if asking something obvious.
@alitvak69 - That is a more general question that you'd probably want to ask in #ansible-devel in IRC or in the Ansible Project google group. Note that dependencies between roles and/or collections can be very difficult, and will likely not be supported (instead, you'll have to tell users to install the collection alongside your role in a requirements.yml file or something like that).
Also note that Ansible will still have modules like pear available in the next release (even without specifying the collection) if you install with pip install ansible.
Thank you for your reply. All work on the pear module has been shifted to collections. So the latest feature / bug fix I needed had only been released in community collections. A module with the same name in both places sounds really bad especially if one of them would have an outdated code.