Interview Prep/Ansible/Project Structure and Design

Monorepo or separate repos for roles? How do you decide?

IntermediateProductionProject Structure and Design
Answer

One monorepo is the right start: a single PR can change a role and its callers, and there is no version-matrix to manage. Split a role into its own repo (or collection) when other teams consume it, when it needs an independent release cycle, or when different people own it.

When we split, each role gets semantic version tags and consumers pin them in requirements.yml. The cost of splitting is dependency management and cross-repo changes, so do it only when the sharing benefit is real.

All Ansible questions Roadmap: Ansible

More on Project Structure and Design