Another random thought, run dos2unix on the template?
On 14 Apr 2015 22:39, "Neil - Puppet List" <maillist-pup...@iamafreeman.com>
wrote:

> Glad you just care why.
>
> so I agree you should not be seeing the extra lines.
>
> Do you have extra whitespace after the > ?
>
> key and value are bothering me.
> Is key something else unrelated? (Should it be @key?) If you remove that
> line do you get the same behaviour?
>
> Neil
> I care because I shouldn't be getting the new line if I'm using the
> closing -%> correct? And in any other type of file I do this very same
> syntax I don't get empty lines. So why is it happening here?
>
> On Tuesday, April 14, 2015 at 3:10:58 PM UTC-4, Neil - Puppet List wrote:
>>
>> 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" <mros...@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...@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/CAAohVBdV7OCgm-mjk_Ad8fChWE_VW-%3DW2nUdog8iqoFOoBgKFA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to