Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-9401

Puppet 6 unable to parse a heredoc

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Duplicate
    • None
    • None
    • None
    • None
    • Bad: 

      CentOS 7, Puppet 6.0.4

      openSUSE 15.0, Puppet 6.1.0

      Good:

      CentOS 7,  Puppet 5.5.1

      Solaris 11.4, Puppet 5.5.0

    • Needs Assessment
    • Needs Assessment

    Description

      Puppet 6.0 and 6.1 are unable to parse the following code. (This is a minimized example and doesn't compile but it ought to pass 'puppet parser validate'.)

       

      class test {
       
       
            $sg_config = @("EOT"/L)
              -cert ${facts['domain']}.crt.pem \
              -cacert ${facts['domain']}.ca.pem \
              -key ${facts['domain']}.key.pem \
              | EOT
      }
      

       

      Removing one of the blank lines from the beginning of the class makes the parser happy again. The same code validates and works under Puppet 5.x

      /tmp> puppet parser validate init.pp
      Error: Could not parse for environment production: Syntax error at '[' (file: /tmp/init.pp, line: 9, column: 14)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mihkela Mihkel Ader
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support