Last Updated on 3 weeks by Sachin G
When I first started learning Ansible, I was amazed by how a few lines of YAML could configure an entire Linux server. But as I dug deeper, I noticed something: the modules seemed endless and sometimes overwhelming. Back in the early days, all of Ansible’s modules were packed inside the core engine. It worked, but managing hundreds of modules in a single package became messy.
That’s where Ansible Content Collections come in. Introduced with Ansible 2.10, collections changed the way Ansible organizes and distributes automation content. And at the heart of it, the ansible.builtin
Collection remains one of the most critical building blocks for every Ansible user.
In this article, I’ll break down what content collections are, how they improve automation workflows, and why ansible.builtin
deserves your attention if you’re serious about Ansible automation.
What Are Ansible Content Collections?
In Ansible, the concept of a content collection was introduced with version 2.10. Essentially, a collection bundles together modules, roles, and plugins into a cohesive unit.
Why Did Collections Become Necessary?
- Before Ansible 2.10, all modules lived inside the core package.
- As the ecosystem grew, it became harder to manage module names and dependencies.
- Any update to modules required a change in the Ansible core itself, which slowed down development.
To solve this, Ansible introduced collections, making modules easier to manage, update, and distribute.
Namespace Example
A collection belongs to a namespace, which acts like a folder. For example:
ansible.builtin
→ the default, built-in modules.community.general
→ a community-driven collection with hundreds of useful modules.amazon.aws
→ AWS-specific automation collection.
This namespacing made automation modular, flexible, and scalable, especially for enterprise-level deployments.
Key Components of a Collection
A typical collection includes:
- Roles – Predefined automation tasks
- Modules – Units of work (e.g., install a package, manage files)
- Plugins – Extend Ansible with filters, lookups, etc.
- Docs & Examples – Usage guidance
Directory structure example:
collections/
└── ansible_collections/
└── my_namespace/
└── my_collection/
├── roles/
├── plugins/
├── docs/
└── README.md
Benefits of Using Ansible Content Collections
Collections are more than just packaging — they improve your entire automation workflow.
- Separation of Concerns
Each collection is independent, meaning cloud providers (AWS, Azure, GCP) or third-party vendors can maintain their own modules without bloating Ansible Core. - Faster Updates
Collections can be updated separately from Ansible itself. For example, if AWS adds a new service, you can just update theamazon.aws
collection without upgrading the entire Ansible package. - Ease of Use
With simple commands, you can install collections from Ansible Galaxy or even publish your own.
ansible-galaxy collection install community.general
4. Better Playbook Management
Collections make your playbooks more organized. Instead of long, messy module paths, you can reference collections clearly with namespaces.
What is ansible.builtin
and Why It Matters
When you write an Ansible playbook, you often use modules like copy
, file
, service
, etc. These core modules are part of the ansible.builtin
collection, which ships with ansible-core.
✅ Role of ansible.builtin
- Provides essential modules for tasks like managing files, services, users
- Ensures backward compatibility
- Eliminates dependency on external collections for basic operations
Example: When you run:
- name: Create a file
ansible.builtin.file:
path: /tmp/testfile
state: touch
Here, file
is part of ansible.builtin
, meaning you don’t need to install anything extra.
Common ansible.builtin
Modules
Module | Purpose |
---|---|
file | Manage files and directories |
copy | Copy files to remote machines |
service | Manage services (start, stop, restart) |
package | Install or remove packages |
command | Execute commands on remote hosts |
Managing Ansible Content Collections
Before listing or managing collections, ensure Ansible and its execution environment are set up correctly.
List Installed Collections
You can list collections installed on your system using Ansible Navigator:
ansible-navigator collections list
This command will display the list of installed collections along with their versions. Screenshot below showing collections after freshly installing Ansible Navigator and its Execution Environment.
The Role of ansible.builtin
in Ansible Automation
Among all namespaces, ansible.builtin
is the foundation of Ansible. It’s included by default, so you don’t need to install it separately.
Key Features of ansible.builtin
- Always Available
When you install Ansible,ansible.builtin
is already there. You can immediately start using modules likecopy
,file
,user
, orpackage
. - Core Functionality
It covers day-to-day automation tasks such as:- Package management (
apt
,yum
) - File manipulation (
copy
,file
,template
) - System management (
user
,group
,service
) - Networking and security basics
- Package management (
- Reliability & Quality
Maintained by Ansible itself, theansible.builtin
collection undergoes rigorous testing and is always in sync with new releases. - Consistency & Compatibility
All modules in this collection follow a consistent syntax, making it easy to plug them into your playbooks and roles without surprises.
Exploring ansible.builtin
with Ansible Navigator
When you run “ansible-navigator doc -l”, it will display a list of available documentation topics in all listed collections that you can explore further using Ansible Navigator.
ansible-navigator doc -l
This command lists modules, plugins, and roles within all collections — including ansible.builtin
.
Practical Example: Using ansible.builtin.copy
Let’s look at a simple playbook that copies a configuration file to a remote server:
---
- name: Copy Nginx configuration
hosts: webservers
tasks:
- name: Deploy nginx.conf using ansible.builtin.copy
ansible.builtin.copy:
src: ./nginx.conf
dest: /etc/nginx/nginx.conf
owner: root
group: root
mode: '0644'
This example shows how ansible.builtin.copy
handles file transfer and permissions in one simple task.
Real-World Use Cases
- System Administration
Automating package updates, creating users, and managing services across hundreds of Linux servers. - Cloud Infrastructure
Combineansible.builtin
with cloud-specific collections likeamazon.aws
for hybrid workflows. - CI/CD Pipelines
Use built-in modules for file management and templating, while external collections handle integrations.
Troubleshooting Common Issues
- Error: hestia install detected. unable to continue
This isn’t directly related to Ansible but shows why collections matter — separating functionality avoids conflicts between modules. - Modules Not Found
If you can’t find a module, check whether it belongs to a separate collection (community.general
,amazon.aws
) instead ofansible.builtin
.
FAQs
A collection is a bundle of modules, roles, and plugins packaged under a namespace for easier management and distribution.
ansible.builtin
separate from Ansible? No, it ships with Ansible by default.
Use ansible-galaxy collection install <namespace.collection>
Roles are reusable automation units, while collections can contain multiple roles, modules, and plugins.
Ansible’s move to content collections was a game-changer, transforming the way modules are organized, maintained, and consumed. At the center of it, ansible.builtin
remains the backbone — providing reliable, high-quality modules for day-to-day automation.
If you’re just starting with Ansible, focus first on mastering ansible.builtin
. Once you’re comfortable, expand into collections like community.general
or vendor-specific ones for AWS, Azure, or Kubernetes.
Automation is only as powerful as the foundation it stands on — and for Ansible, that foundation is ansible.builtin
.
Learn Smarter. Level Up Faster →
Want to master Linux, DevOps, Ansible, or Cloud workflows the smart way? I’ve curated a list of top-rated, real-world Udemy courses — based on student reviews and practical feedback.
Visit the Recommended Courses page to explore and enroll in courses trusted by the community.
See Curated Courses →I’m Sachin Gupta — a freelance IT support specialist and founder of techtransit.org. I’m certified in Linux, Ansible, OpenShift (Red Hat), cPanel, and ITIL, with over 15 years of hands-on experience. I create beginner-friendly Linux tutorials, help with Ansible automation, and offer IT support on platforms like Upwork, Freelancer, and PeoplePerHour. Follow Tech Transit for practical tips, hosting guides, and real-world Linux expertise!