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.
More on Project Structure and Design
What does a production Ansible repository look like?BeginnerMonorepo or separate repos for roles? How do you decide?IntermediateHow do you structure inventories for dev, stage and prod?BeginnerHow do you prevent someone from running a playbook against production by accident?IntermediateWhat does "thin playbooks, fat roles" mean?IntermediateWhat makes a well-designed role?Intermediate