Please do not use global vars. pass this as parameter of puppet resource