Runbook – Ansible Collections Release¶
- Purpose: Release a HybridOps Ansible collection to Galaxy and update
hybridops-coreto consume the published version. - Trigger: Planned collection release after role validation and packaging checks.
- Impact: A bad release breaks
hyops setup ansibleand downstream Ansible execution. - Severity: P2.
Scope¶
This runbook covers the collections currently on the clean release path:
hybridops.commonhybridops.apphybridops.helper
hybridops.network can be built and packaged, but it is not part of the current hybridops-core shipping path and should be released separately when its module-backed validation is ready.
Preconditions¶
- The target collection repo has:
- updated
galaxy.yml - updated
meta/runtime.yml - clean package surface
- passing
hyops test rolesmoke checks or an equivalent integration-backed validation path - The repo GitHub Actions secrets include
ANSIBLE_GALAXY_API_KEY - The publish workflow is present under
.github/workflows/release.yml hybridops-coreis ready to pin the target version in tools/setup/requirements/ansible.galaxy.yml
Release model¶
The current release flow is:
- validate and build in the collection repo
- push a version tag that matches
galaxy.yml - let GitHub Actions publish the tarball to Galaxy
- update
hybridops-coreto consume the published version - run
hyops setup ansible - verify runtime-installed Galaxy collections take precedence over vendored fallback
Publication is tag-driven, not commit-driven.
Steps¶
- Choose the collection and version
-
Example:
export COLLECTION_REPO=/path/to/ansible-collection-common export VERSION=0.1.1 -
Confirm
galaxy.ymlmatches the intended version:python3 - <<'PY' import yaml from pathlib import Path p = Path("galaxy.yml") print(yaml.safe_load(p.read_text())["version"]) PY -
Run local release checks
-
Build:
ansible-galaxy collection build --force -
Run the relevant role smoke checks through
hyops test rolefor the roles actually being shipped. - Prefer syntax-check first, then a real role-local or state-backed smoke execution.
- Record the build and validation logs under the normal runtime run-record path.
Example:
hyops test role hybridops.common.postgresql_service \
--env dev \
--workspace-root /path/to/hybridops-collections-src/collections/dev/workspace \
--local-inventory \
--syntax-check
- Confirm the workflow shape
- CI must run on
push mainand PRs. -
Publish must run on version tags:
on: push: tags: ["v*"] -
The release workflow must verify tag/version match before publish.
-
Commit the release
-
Commit the version bump, changelog, and any release-surface fixes:
git add . git commit -m "release: hybridops.<name> v${VERSION}" git push origin main -
Create and push the release tag
-
The tag must match
galaxy.ymlexactly:git tag "v${VERSION}" git push origin "v${VERSION}" -
This triggers the collection publish workflow.
-
Verify Galaxy publish
- Check GitHub Actions for the publish run.
- Confirm the collection appears on Galaxy at the expected version.
-
Validate install from a clean path:
ansible-galaxy collection install hybridops.<name>:==${VERSION} --force -
Update
hybridops-coreconsumption - Pin the released version in
hybridops-core/tools/setup/requirements/ansible.galaxy.yml. - Treat those shared
hybridops.*entries as explicit Galaxy pins, not floating versions. -
Run:
hyops setup ansible -
Confirm the runtime installs into:
<runtime_root>/state/ansible/galaxy_collections
-
Confirm those runtime-installed collections are preferred over vendored fallback.
-
Verify one shipped path
- Run one representative module or blueprint that uses the published collection.
- Example paths:
platform/linux/eve-ngplatform/network/dns-routingplatform/onprem/postgresql-ha-backup
Verification¶
ansible-galaxy collection build --forcesucceeds locallyhyops test role ...succeeds for the release-surface roles being changed- The publish workflow succeeds on the pushed version tag
- Galaxy shows the expected version
hyops setup ansibleinstalls the pinned version into runtime state- A representative
hybridops-coremodule path succeeds against the published collection
Rollback¶
If the release is bad:
- revert the version bump in the collection repo
- publish a corrected version rather than mutating the existing Galaxy record
- revert the pin in
hybridops-core - rerun
hyops setup ansible
Do not rely on vendored fallback as the rollback plan for a shipped release.
References¶
docs/adr/ADR-0606-ansible-collections-release-process.mdhybridops-core/tools/setup/README.mdhybridops-core/tools/setup/requirements/ansible.galaxy.yml