Fix template being evaluated before variables

Ciao Alessandro,

Commits92909e8c84f54f79b5374aac6fb8b00f59f3dfa9  and f5e0f4cd74196aae775416590892e88419401a82 evaluated template before assigning variables, so conf files ended with no values or default values.

Will try to add some tests later.

Regards, Javier.