{
  backends: [<% backends.each do |backend| -%>
  "<%= backend %>",
  <% end -%>]
, graphitePort: "<%= graphiteport %>"
, graphiteHost: "<%= graphiteserver %>"
, address: "<%= address %>"
, port: "<%= listenport %>"
, flushInterval: "<%= flushinterval %>"
, percentThreshold: [<%= percentthreshold.join(', ') %>]
<% config.each do |k, v| -%>
, <%= k %>: <%= v %>
<% end -%>
}

{
  backends: [<% @backends.each do |backend| -%>
  "<%= backend %>",
  <% end -%>]
, graphitePort: "<%= @graphiteport %>"
, graphiteHost: "<%= @graphiteserver %>"
, address: "<%= @address %>"
, port: "<%= @listenport %>"
, flushInterval: "<%= @flushinterval %>"
, percentThreshold: [<%= @percentthreshold.join(', ') %>]
<% @config.each do |k, v| -%>
, <%= k %>: <%= v %>
<% end -%>
}

Use instance-variable syntax in templates
Use instance-variable syntax in templates

to avoid deprecation warnings in puppet 3.2
