Ansible Galaxy
Cheat sheet · https://pcornel.dk/topic.php?topic=5419
Answer
Ansible Galaxy is a distribution and discovery ecosystem for roles and collections; consuming Galaxy content introduces version, provenance, dependency and compatibility boundaries beyond local playbook code.
Remember
- Galaxy download success ≠ content trusted; provenance and review are separate security controls.
- Latest version ≠ compatible version; ansible-core/platform dependencies can change.
- Requirements entry ≠ runtime installation state; execution environments can drift.
- Role/collection popularity ≠ correctness or maintenance guarantee.
First checks
ansible-galaxy collection install <ns>.<name>:<version>— pinned installansible-galaxy role install -r requirements.yml— roles- Review third-party content — trust
Verify in this order
Galaxy → requirements.yml → installed content
Where it usually breaks
Galaxy installation proves content was retrieved/installed; it does not independently establish trust, compatibility or safe target behavior.
Inventory/vars → play/task selection → connection/become → module request → module result → target object read-back → handler/service effective state → workload verification.
Ansible Galaxy Ansible boundary map
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Inputs / selection | Correct inventory, hosts, variables/facts and content are explicit | Wrong scope, stale facts, hidden precedence or content-version drift |
| Execution | Connection, privilege, module/task context and ordering match intent | Unreachable, wrong execution host, privilege/plugin failure or misleading skip/change state |
| Result semantics | Per-host/item results are preserved and interpreted correctly | Aggregate recap hides partial/skipped/handled failures |
| Target proof | Resource/workload read-back and rerun confirm convergence | Green Ansible status treated as end-to-end acceptance |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5419