On 12. mai 2017 10:40, Daniel Andrei Minca wrote:
> Hi there,
>
> In our company X we have many Ansible roles & playbooks spread among
> different repositories, all the playbooks follow the Ansible playbook
> best-practices guide
> <
http://docs.ansible.com/ansible/playbooks_best_practices.html>.
>
> I'm looking for a way to modularize all those playbook repos.
>
> In order to achieve that, I found that hosting our own Ansible Galaxy
> server would be the best choice since:
> - we can easily *re-use roles* without having *duplicate code* in each
> repo,
> - we can also impose a good standard over Ansible Roles (referring here to
> properly documenting the role's *./meta/main.yml* & *README.md *et. al. ),
> - not to mention, we would *force* everyone to create a NEW repo for each
> role instead of pushing everything in a single repo (calling this practice:
> *crapload-repo* = usually the size of Gigabytes and takes some time to
> download).
>
> So my questions here are:
> 1) how did you configured your own Ansible Galaxy server?
> 2) can a simple Nginx server with default nginx.conf do?
> 3) could you give me a list of *prerequisites* of setting this up, or guide
> me to some resources?
An alternative route that we use, replace galaxy with Git repository
manager.
In Gitlab we have a group called "Ansible roles".
Each role have it own git repository in this group with README.md and a
meta/main.yml.
In the ansible repositories that need the roles
requirements.yml:
---
- src: git@gitlab:ansible-role/apache.git
scm: git
version: "1.1"
--
Kai Stian Olstad