Issue #14423 has been updated by Ryan Coleman.
Anand, does this affect you in 2.7?
Here's my pseudo-code:
<code>
class foo (
$param1 = 'one',
$param2 = 'two',
) {
notify { 'hello world!': }
}
include foo
</code>
...
<code>
root@debian6:~# puppet --version
2.6.17
root@debian6:~# puppet apply class_params.pp
Could not parse for environment production: Syntax error at ')' at
/root/class_params.pp:4 on node debian6.puppetlabs.vm
</code>
<code>
root@debian6:~# puppet --version
2.7.18
root@debian6:~# puppet apply class_params.pp
notice: hello world!
notice: /Stage[main]/Foo/Notify[hello world!]/message: defined 'message' as
'hello world!'
notice: Finished catalog run in 0.10 seconds
</code>
----------------------------------------
Bug #14423: syntax error when , is incuded
https://projects.puppetlabs.com/issues/14423#change-69551
Author: Anand Kumria
Status: Needs More Information
Priority: Normal
Assignee: Andrew Parker
Category:
Target version:
Affected Puppet version: 2.7.14
Keywords: DSL
Branch:
The general syntax of the puppet DSL allows for trailing commas (,) to appear
at the end of each line.
**except**, it seems as an overridable parameter to a class.
This inconsistency just bit me on my first module, where I had it working
locally and did a "final cleanup" prior to upload.
<pre>
Could not parse for environment production: Syntax error at ')' at
/tmp/vagrant-puppet/modules-0/nullmailer/manifests/init.pp:9 on node
web1.example.net
</pre>
To fix, I did:
<pre>
% git diff
diff --git a/manifests/init.pp b/manifests/init.pp
index ab5cd41..7237184 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -4,7 +4,7 @@ class nullmailer (
$service = $nullmailer::params::service,
$manage_etc_mailname = $nullmailer::params::manage_etc_mailname,
$adminaddr = "root@$::domain",
- $remoterelay = "smtp.$::domain",
+ $remoterelay = "smtp.$::domain"
) inherits nullmailer::params {
</pre>
This is from akumria/nullmailer on the puppetforge, where I uploaded v1.0.1
with the workaround.
But it seems odd and inconsistent that I had to.
--
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.