Fix dynamic scope lookup in templates

Use of outside-scoped variables in templates does not work in puppet
3. So you need to explicitly look them up the scope with scope.lookupvar
and their absolute namespace specified.

Change-Id: Ic42e1f2da7dc5ba6439084398dfa93b4dd559228
Signed-off-by: Giuseppe Lavagetto <glavagetto@wikimedia.org>