Dismissing full-blown programming languages is a mistake IMHO. Sometimes it's useful to generate configuration (e.g. starting from a template and to build configuration for prod vs QA or for various deployment targets).

If you have a full-blown programming language you can sprinkle a little bit of code in the template and get express everything you need in a clean way. If all you have is a templating language you have to shoehorn your logic into it (likely making a mess) or use the templating language + a "real" programming language.

The ideal setup is something like the safe interpreters in Tcl, which let you do very fun things like having config files in pure Tcl, but with limited access to the machine and master interpreter.

This is true. I did a lot of this once upon a time, with great success.