#ansible (2021-03)
Discussions related to ansible configuration management
2021-03-23
Hello, how do you organize your ansible code with repository ? I have a mono repos but it start to become quite big and I am thinking on creating multiple .. do you have a dedicated repo for common modules ? one per application or application group ?
for an Enterprise client this is how we did it:
• repo per Ansible Role ( include molecule tests)
• repo per project that use ansible-galaxy to download roles based on tags for each role ( include tox/molecule tests)
ha I see thanks @Mohammed Yahya for the hint, I will do as you suggested https://docs.ansible.com/ansible/latest/user_guide/collections_using.html#installing-a-collection-from-a-git-repository
I’m working on the refactoring of a monorepo Ansible project. I’m switching to use Ansible collection, each one on a single repo and then a repo for each “project” conaining the playbook that make use of the collections. Get collections from git is only supported by Ansible 2.10+
Another solution create a collection with submodule git for roles