# Collections

## What You'll Learn

- What a collection actually is, and how it relates to `ansible-core`
- How to install one and use it correctly with FQCNs
- Where to find collections, and how to pin their versions

## Why Collections Exist

`ansible-core` ships the engine and a small `ansible.builtin` module set — everything else (cloud providers, network vendors, community tooling) is distributed as a **collection**: a versioned, installable bundle of modules, plugins, and roles under one namespace.

```text
amazon.aws.ec2_instance      # namespace.collection.module
community.general.timezone
ansible.posix.mount
```

This is precisely why FQCNs matter in practice (see [Modules](<https://computecentral.in/ansible/core-concepts/04-modules/index.md#why-fqcns-not-short-names>)) — `namespace.collection.module` tells you exactly which package a module came from, with no ambiguity about which collection's version of a same-named module is running.

## Minimal Example

requirements.yml

```yaml
collections:
  - name: community.general
    version: ">=8.0.0"
  - name: amazon.aws
    version: "8.1.0"
```

```bash
ansible-galaxy collection install -r requirements.yml
```

Pin collection versions the same way you'd pin any other dependency — an unpinned `ansible-galaxy collection install community.general` today and next month can silently resolve to different module behavior.

## Read in this order

1. [Collection Structure](<https://computecentral.in/ansible/collections/01-collection-structure/index.md>) — what's actually inside one
2. [Installing and Using Collections](<https://computecentral.in/ansible/collections/02-installing-and-using-collections/index.md>) — `requirements.yml`, version pinning, offline installs
3. [Publishing Collections](<https://computecentral.in/ansible/collections/03-publishing-collections/index.md>) — sharing your own

To build one from scratch, see [Build a Collection From Zero](<https://computecentral.in/ansible/build-your-own/03-build-a-collection-from-zero/index.md>) in the next section.

## Next

Continue to [Build Your Own](<https://computecentral.in/ansible/build-your-own/index.md>).
