1. What’s new in Ansible
v2.10?
Ompragash Viswanathan
https://www.linkedin.com/in/ompragash/
2. Most of the Ansible elements are split
off from the base repo and made into
Ansible Content Collections or
Collections.
3. Ansible-Base 2.10:
- It’s only the execution engine (i.e. the boiler plate code along with executable binaries
ansible, ansible-playbook, ansible-galaxy, etc)
- Contains very small set of built in plugins
Installing ansible-base
$ pip install ansible-base==2.10.0b1 --user
4. Ansible Content Collections or Collections:
- A Collection is new distribution format to package and deliver all types of Ansible content.
- Components are well defined as there is a standard for the directory structure.
- Collections can be installed using ansible-galaxy utility.
- By default collections are installed in path ~/.ansible/collections/ansible_collections/
Installing Collections:
$ ansible-galaxy collection install my_namespace.my_collection
Or
$ cat requirements.yml
---
collections:
- my_namespace.my_collection
$ ansible-galaxy install -r requirements.yml
6. How to access the contents from Ansible Collections?
- A content in Ansible Collections is accessed with namespace name.
Example:
my_namespace.my_collection
amazon.aws
Here,
amazon is the namespace name
aws is the collection name
Now, to access the modules from amazon.aws you have to
use the Fully Qualified Collection Name(aka FQCN)
my_namespace.my_collection.my_module
amazon.aws.ec2
Documentation: ansible-doc amazon.aws.ec2
7. Ansible-2.10 Alpha:
- Ansible Community Team released Ansible-2.10 Alpha on 18th June 2020
- It’s also known Ansible Community Distribution (aka ACD)
- The roles and playbooks that you currently use should work out of the box.
- Collections that are part of Ansible-2.10 Alpha are installed in path:
/tmp/virtualenv/lib/python3.6/site-packages/ansible
(Just to clear the air /tmp/virtualenv is a python virtual environment)
- Ansible 2.10.0a1 Alpha includes the ansible-base package plus a range of Ansible Collections.
List of Collections included in Ansible-2.10 Alpha can be found here:
https://github.com/ansible-community/ansible-build-data/blob/2.10.0a1/2.10/acd-2.10.0a1.deps