Hello You have 3 newlines there which I've marked with Xs I expect you to get N+2.
But why do you care? Out of "I wonder why that is happening?" Is fine. Beyond that the XML is for a machine not you to spend your time reading. I hope :) Neil On 14 Apr 2015 16:20, "Mark Rosedale" <mrosed...@vivox.com> wrote: > > So I have an erb template. x.xml.erb > > Inside the file I iterate over an array to add some contents to the file. It looks like so. > > <?xml version="1.0" encoding="utf-8"?> > <VCConfiguration>X > <%- @x_custom.each do |value| -%> > <%= value %>X > <%- end -%>X > <MoreCode><%= key %></MoreCode> > > However, I'm having an issue when puppet actually updates that file. If I have an array with one value in it I'd expect 1 line to be printed instead 3 lines get printed out. So the file might look like this > > <?xml version="1.0" encoding="utf-8"?> > <VCConfiguration> > > > <SomeTextFromPuppet>text</SomeTextFromPuppet> > > > <MoreCode>somekey</MoreCode> > > I've iterated over arrays in other templates in my puppet code without any issue of added lines, but for some reason xml files seem to be giving me trouble. Anyone else experience this, or have an idea what might be going on here? > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/88385a17-729e-47b6-8ac7-6d6ce5d3a0bd%40googlegroups.com . > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAAohVBcXMF2jdxu6WUGJxi2HWEiCoF5myn5dYHYVHFnOnZquvQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.