Using multiple vars_files

I want to read from multiple vars_files in a playbook.

Using a list of lists works, but I’m wondering if it’s actually intended or if I’m just lucky due do how it’s coded.

Example:

vars_files:

    • vars/myapp/defaults
  • vars/empty
    • vars/cluster/${clusterid}
  • vars/empty
    • vars/myapp/${appid}
  • vars/empty

It is indeed intended to work like that :slight_smile:

What it does is match the first file there is, so you can do it
exactly as you have it -- an example OS specific includes based on
facts (or variables) that fall back to a default.