Issue #4896 has been updated by Markus Roberts.

Status changed from Accepted to Investigating

I'm able to get something similar with 2.6.1, though not exactly.  It may be 
that we fixed this( or just moved it) with the escapes in single quoted strings 
fix.


----------------------------------------
Bug #4896: Invalid YAML with multiline file content
http://projects.puppetlabs.com/issues/4896

Author: Paul Berry
Status: Investigating
Priority: Normal
Assignee: Markus Roberts
Category: 
Target version: 
Affected version: 2.6.1
Keywords: 
Branch: 


The following stanza creates valid YAML in 0.24.9 but invalid YAML in 2.6.1:

<pre>
file { "/root/foo": 
content => [ 'bar', 
'foo = "foo1 foo2 foo3 \ 
foo4 foo5"' ] 
}
</pre>

Failure Message:

<pre>
/usr/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 200, col 16: ` 
tags: ' (ArgumentError)
from /usr/lib/ruby/1.8/yaml.rb:133:in `load' 
from /usr/lib/ruby/site_ruby/1.8/puppet/application/parse.rb:34:in 
`run_command' 
from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:300:in `run' 
from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:397:in `exit_on_fail' 
from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:300:in `run' 
from /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:55:in `execute' 
from /usr/bin/puppet:4
</pre>

Offending YAML (note the incorrect offset of the 'tags' line:

<pre>
- &id021 !ruby/object:Puppet::Relationship
      source: *id006
      target: &id014 !ruby/object:Puppet::Resource
        catalog: *id001
        exported:
        file: &id007 /etc/puppet/manifests/test.pp
        line: 51
        parameters:
          !ruby/sym backup: false
          !ruby/sym content:
            - bar
            - |-
              foo = "foo1 foo2 foo3 \
                                 foo4 foo5"
            tags:
          - file
          - node
          - testnode
          - class
        title: /root/foo
        type: File
        virtual:
</pre>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to