How do you organize ansible roles?

18 views
Skip to first unread message

holo...@int.pl

unread,
Sep 28, 2021, 4:03:44 PM9/28/21
to ansible...@googlegroups.com

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?

John Petro

unread,
Sep 28, 2021, 4:52:47 PM9/28/21
to ansible...@googlegroups.com
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

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/kojifsvxikqamoyxhgjy%40cfgn.
Reply all
Reply to author
Forward
0 new messages