How do you version and release internal roles and collections?
IntermediateProductionTesting, CI/CD and Quality
Answer
Semantic versioning with Git tags. Breaking changes (renamed variables, removed defaults, changed behaviour) bump the major version; new optional features bump the minor; fixes bump the patch.
For collections, the version lives in galaxy.yml, and we generate the changelog from fragments with antsibull-changelog, so each PR adds a small YAML file instead of fighting over CHANGELOG conflicts.
antsibull-changelog release --version 2.3.0
ansible-galaxy collection build
ansible-galaxy collection publish acme-platform-2.3.0.tar.gz --server private_hub
Consumers pin versions in requirements.yml and upgrade through a PR, so a role change never reaches production because someone else tagged a release.
More on Testing, CI/CD and Quality
What does a testing pyramid look like for Ansible code?BeginnerHow do you roll out `ansible-lint` profiles across a team without blocking everyone?IntermediateWhen do you use `skip_list`, `warn_list` and `# noqa`?IntermediateHow do you set up pre-commit hooks for an Ansible repo?BeginnerHow is a Molecule scenario laid out, and what does `molecule test` actually run?IntermediateDocker, Podman or real VMs as the Molecule driver: how do you choose?Advanced