Coming from puppet I really got used to the hierarchical data structure hiera provides. It's easy to use, yet pretty powerful when used in combination with the module_data puppet module, which allows you to put your hiera-data in the module directory itself, while still being able to globally override stuff from the main hiera source.
The approach I present here allows you to do something similar with salt and it's pillar data by using Jinja2 only. No additional modules whatsoever are required for this to work.
Configuration data is being split up into four levels:
- state defaults
- filtered state defaults
- pillar data
- filtered pillar data