Why is this not the answer to your needs?
In my opinion, the only part missing is the possibility to specify the roles of the interfaces via variables, but that only makes sense if you want to use a single template to configure lots of devices, which would make perfect sense for simple cases (where it is usually not necessary); if you need to specify the interface roles using variables, chances are high that each installation will differ in more than just the preferences of the interface, so you will have to change more than just the interface roles.