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.
More on Project Structure and Design
What does a production Ansible repository look like?BeginnerHow 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?IntermediateWhat goes into a project-level `ansible.cfg` for production?Beginner