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_custom.each do |value| -%> <%= value %> <%- end -%> <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.