Issue #14423 has been updated by Andrew  Parker.

Status changed from Investigating to Needs More Information
Assignee changed from Andrew  Parker to Anand Kumria

I have cloned your git repo, checked out the commit that should have the 
problem, and validated that it parses and it all seems to work for me. What 
were you doing when you got the error?

<pre>
[16:55:13][ruby-1.8.7-p358] andy:tmp> git clone 
https://github.com/akumria/puppet-nullmailer.git
Cloning into 'puppet-nullmailer'...
remote: Counting objects: 68, done.
remote: Compressing objects: 100% (34/34), done.
remote: Total 68 (delta 35), reused 66 (delta 33)
Unpacking objects: 100% (68/68), done.
[16:55:23][ruby-1.8.7-p358] andy:tmp> cd puppet-nullmailer/
[16:55:29][ruby-1.8.7-p358] andy:puppet-nullmailer> git checkout 
5c4cb4d14f5dd1ebec000c502750e41b01da41e1
Note: checking out '5c4cb4d14f5dd1ebec000c502750e41b01da41e1'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at 5c4cb4d... Add a Modulefile so we can add a release to the 
Puppet forge
[16:55:40][ruby-1.8.7-p358] andy:puppet-nullmailer> cat manifests/init.pp 
class nullmailer (
  $package = $nullmailer::params::package,
  $absentpackages = $nullmailer::params::absentpackages,
  $service = $nullmailer::params::service,
  $manage_etc_mailname = $nullmailer::params::manage_etc_mailname,
  $adminaddr = "root@$::domain",
  $remoterelay = "smtp.$::domain",

) inherits nullmailer::params {

  anchor {'nullmailer::start':}->
  class {'nullmailer::package':}~>
  class {'nullmailer::config':}~>
  class {'nullmailer::service':}~>
  anchor {'nullmailer::end':}

}
[16:56:01][ruby-1.8.7-p358] andy:puppet-nullmailer> puppet parser validate 
manifests/init.pp 
[16:56:13][ruby-1.8.7-p358] andy:puppet-nullmailer> 
</pre>
----------------------------------------
Bug #14423: syntax error when , is incuded
https://projects.puppetlabs.com/issues/14423#change-63098

Author: Anand Kumria
Status: Needs More Information
Priority: Normal
Assignee: Anand Kumria
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.

Reply via email to