Minor improvement: Fixed variable scope problem in template ( http://docs.puppetlabs.com/guides/templating.html#referencing-variables )