How do you organize ansible roles?

Hey! I’m curious about how do you organize Ansible roles. I want to share a few roles in the public Git repository.

  • What do you think about storing roles in the ~/ansible/roles directory?
  • Do you recommend pushing the entire ~/ansible directory together with playbooks and other stuff in the git repository or execute git init in the directories with role-related stuff like ~/ansible/roles/role1, ~/ansible/roles/role2, etc.?
  • If I decided to go the first way, what’s the best method to share a single ansible role?

So, this may not answer all of your questions, but hopefully it hits on a few. I have a git repo for the “project” directory structure, and then a repository for each role. I then use the requirements.yml to grab the roles I need for a particular project, and it shoves them into the roles dir for the project.

–John