Include files - nsg/ansible-inventory GitHub Wiki
One large file will be messy quite quickly, I recommend that you split your inventory to separate files. You can use include
to include everything together.
inventory.yml
root:
webservers:
include:
- webservers.yml
webservers.yml
- www1.example.com
- www2.example.com
- www3.example.com
You can also use includes in clever ways to include common variables.