What I'm looking for is a task (or tasks) to read whatever .yml files exist in a specified folder and combine them into a file containing all the variables. For example:
pets/steves_pets.yml:
cats:
- spot
- snowy
hamsters:
- mephistopheles
And
pets/jacks-pets.yml:
dogs:
- rex
- woof
hamsters:
- prometheus
Becomes
wherever/all-pets.yml:
cats:
- spot
- snowy
dogs:
- rex
- woof
hamsters:
- mephistopheles
- prometheus
In fact it's not even necessary to generate an all-pets.yml - as long as the full combined list is available to Ansible for use in roles / tasks. But a combined list file approach would be fine if easier.
Any pointers would be greatly appreciated!