fixed variable scope in puppet module