Hi everyone,
I am currently working on optimizing our project structure. We are using a monorepo approach and I am considering placing our Ansible roles inside a specific subfolder (e.g., /ansible/roles/my_role/).
I have two main questions regarding this setup:
- Architecture: Is hosting an Ansible role within a subdirectory of a larger repository considered a standard “best practice”? Or is it strongly recommended to maintain roles in their own dedicated repositories?
- Technical Implementation: If the subdirectory approach is acceptable, how can I configure the
requirements.ymlfile to correctly target and install only that specific subdirectory usingansible-galaxy role install?
I have looked into the documentation, but I am struggling to find the correct syntax for partial repository imports. Any guidance, community feedback, or links to relevant resources would be greatly appreciated.
Thank you in advance for your help!