If you want to avoid plonking down a module, you could also use augeas here; alas, at least on Fedora/RHEL, the puppet RPM only pulls in the augeas libraries, not augtool, which would force you to change these settings with a Ruby script ... if we could rely on having augtool, the above could be done with

augtool <<EOF
<% broker.each do |setting, value| %>
set /files/etc/puppet.conf/main/<%= setting %> <%= value %>
<% end %>
save
EOF

But I am completely fine with the way things are right now.