I'm not seeing a clear way on how to do this in the docs, and maybe there is some other way to go about it. Basically I want to load up data about multiple applications to use in a template. I tried using include_vars, but I'm not seeing how to dynamically load that. I currently have this structure:
groups_vars/staging_apps.yml:
I want to then load these files by using the app names from above:
groups_vars/apps/app1.yml
groups_vars/apps/app2.yml
Those files would have additional variables that define each app.
In the task I was thinking something along the lines of:
---
- include_vars: group_vars/staging.yml
- name: Print apps
debug: msg="App {{ apps }}"
- include_vars:
.. etc
Any help is appreciated.