Updated templates to correctly reference local scoped variables and avoid deprecation warnings in newer versions of puppet