Managing complex inventory

I’m managing multiple separate applications from my Ansible repo, each with a different set of servers. Each application has multiple instances (dev, stage, prod).
To manage all this I have a whole bunch of inventory files:

  • app1
  • app1_variant1
  • dev
  • stage
  • prod- app1_variant2
  • dev
  • stage
  • prod- app2
  • dev
  • stage
  • prod- etc.
    (that’s 9 separate inventory files for those 2 apps).

Is there a better way to manage this? How does everyone else deal with lots of applications with different sets of servers?

Basically you don’t need different inventory files if you don’t want them to be.

More than likely, you’ll just want to seperate dev/stage/prod and have groups for the apps.