Best practices for multiple data centers and multi tenancy

Hi,

I'm a former Chef user and recently gave Ansible a try because of its lightweight and agentless approach.
I'm wondering how I should structure my inventories to meet my requirements:

1.
I have different customers for whom I manage a certain number of servers.

2.
Customers are distributed over different ISPs so that there's a need for grouping those customer systems to apply ISP-specific settings (think of a network-config role which assigns specific DNS servers regarding to the ISP the server is hosted by).

3.
The customers have mostly the same software on their systems (LAMP stacks, Java stacks, Mailservers) so that I want to share mostly all roles for all customers.

So I started to create an inventory per customer and group the servers by their individual purpose, e.g.: [lamp-servers].

But know I've no clue where to group those servers by ISPs.

I'd like to be able to run ansible-playbook for all hosts regardless of its purpose to e.g. apply the specific ISP-related network stuff.

Any hints?

Yves

I'm also having a bit of a headache with managing inventories and groups with the need to apply playbooks and roles horizontally and vertically. E.g. Teams want to manage across servers in environments, while a project cares about it's project. I'm still working on it.

Maybe you could create groups for each of the ISPs. These groups could be located in each of the inventories. I believe you can repeat the groups provided they are in a different inventory files.

To access these groups across all inventories, you will need to place all inventories in a directory and reference the directory when running ansible-playbook. Test this with the --list-hosts option when running against one of the isp groups.