Issue #21608 has been updated by eric sorenson. Category set to language Status changed from Unreviewed to Investigating Keywords set to parser errors
The problem in that code is actually that you're trying to do variable interpolation with single quotes in the `source` attribute. When I corrected that to use double-quotes I got a better error message, which indicates the line number correctly: <pre> Error: Could not parse for environment production: Syntax error at '}' at line 8 on node glitch.local </pre> This could probably be improved in the future parser available in Puppet 3.2 and up though; it also does not indicate that there's a missing `:` on the resource declaration: <pre> Error: Could not parse for environment production: Syntax error at '}' at line 8:77 on node glitch.local </pre> Henrik what do you think? ---------------------------------------- Bug #21608: Syntax error at '}'; expected '}' https://projects.puppetlabs.com/issues/21608#change-94183 * Author: Chris Wilson * Status: Investigating * Priority: Normal * Assignee: * Category: language * Target version: * Affected Puppet version: 2.6.18 * Keywords: parser errors * Branch: ---------------------------------------- >From the following code: <pre> # http://stackoverflow.com/questions/6399922/are-there-iterators-and-loops-in-puppet define f { file { "/root/.ssh/${title}": ensure => present, source => 'puppet:///files/ssh_keys/${title}', owner => 'root', group => 'root', mode => '0400', } } f { ["id_beep_down", "id_beep_down.pub", "id_beep_up", "id_beep_up.pub",] } </pre> I think it's missing a colon after the last ], but that's not what the error message says. <pre> [puppet server]$ rpm -q puppet puppet-2.6.18-3.el6.noarch </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 unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
