Interview Prep/Ansible/Project Structure and Design

How do you manage collection and role dependencies in a team?

IntermediateProductionProject Structure and Design
Answer

One requirements.yml in the repo with exact or tightly bounded versions, installed into a project-local collections/ directory (git-ignored) by CI and by a make deps target. Dependencies of the dependencies are resolved by ansible-galaxy, so also record the resulting versions in CI logs.

Upgrades happen in a dedicated PR with a changelog check, and are tested in Molecule and in stage. In AWX or AAP, dependencies are baked into an execution environment, which is the better answer for reproducibility than installing at job time.

All Ansible questions Roadmap: Ansible

More on Project Structure and Design