That is *a* way to organize (especially when first getting accustomed with 
Ansible), not necessarily *the* way.  Ansible allows you to fully configure 
the inventory path, library path, role path, etc with either environment 
variables or using ansible.cfg

If you wanted to manage your customers as separate entities but use common 
roles, you could have the following setup.  Just make sure you set the 
roles_path in ansible.cfg.


ansible/
|-- customers
|   |-- bar
|   |   |-- inventory
|   |   |   |-- group_vars
|   |   |   |   `-- all
|   |   |   `-- hosts
|   |   `-- site.yml
|   `-- foo
|       |-- inventory
|       |   |-- group_vars
|       |   |   `-- all
|       |   `-- hosts
|       `-- site.yml
`-- roles
    |-- database
    `-- webserver




- James


On Friday, November 21, 2014 12:51:02 PM UTC-5, Rick Kasten wrote:
>
> I'm just starting out with Ansible, and I'm trying to design my Ansible 
> catalog in an efficient way for the future. My understanding is that this 
> is how a directory structure should look:
>
> ansible/
> group_vars/
> host_vars/
> library/
> roles/
> host_or_inventory_file
> playbook.yml
>
> It seems to me that over time, the ansible/ directory is going to be 
> flooded with hundreds of host files and playbooks, and that seems so 
> inefficient and messy that I can't believe Ansible would have designed it 
> that way. I am going to support hundreds of customer environments with at 
> least dozens of playbooks for each customer; putting them all in the same 
> directory will make that directory quite difficult to read and manage, even 
> if they all run the same set of plays/playbooks.
>
> So is my understanding of this wrong here? How does everybody else do it? 
> What is best practice?
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9c94f0f5-d31d-45ad-b02a-5893b0734412%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to