Source code: https://github.com/behrangsa/sample-ansible-role
Background:
I have three different environments: test, staging, and prod and 3 applications that I deploy to them.
In staging and prod, each application have a dedicated server. In test, they all will be deployed to the same box.
The test inventory looks like this:
.
├── group_vars
│ ├── accounting.yml
│ ├── all.yml
│ ├── payroll.yml
│ └── timesheets.yml
└── hosts
The contents of these files are shown here:
hosts
[timesheets]
test.vagrant.local
[payroll]
test.vagrant.local
[accounting]
test.vagrant.local
all.yml