Some time ago I've solved the same problem but using plain shell scripts instead of Python:

https://codeberg.org/common-good/welder

The desire was to have any kind of configuration management in a team with people for whom the barrier of learning the YAML based Ansible DSL was too high.