Issue #14423 has been updated by Anand Kumria.
File Vagrantfile added
File default.pp added
Assignee changed from Anand Kumria to Andrew Parker
I did the same as you, and also could not reproduce things.
So I've created a minimal environment that simulates mine and shows the error.
First setup the environment:
$ mkdir /tmp/ptest
$ cd /tmp/ptest
$ mkdir files manifests modules
$ cd modules
$ git clone https://github.com/akumria/puppet-nullmailer.git nullmailer
$ cd nullmailer
$ git checkout 5c4cb4d14f5dd1ebec000c502750e41b01da41e1
$ # cp Vagrantfile /tmp/ptest/
$ # cp default.pp /tmp/ptest/manifests/
Then simulate the error:
$ vagrant up
[test] Importing base box 'lucid64'...
[test] Matching MAC address for NAT networking...
[test] Clearing any previously set forwarded ports...
[test] Fixed port collision for 22 => 2222. Now on port 2200.
[test] Forwarding ports...
[test] -- 22 => 2200 (adapter 1)
[test] Creating shared folders metadata...
[test] Clearing any previously set network interfaces...
[test] Available bridged network interfaces:
1) wlan0
2) eth0
What interface should the network bridge to? 1
[test] Preparing network interfaces based on configuration...
[test] Running any VM customizations...
[test] Booting VM...
[test] Waiting for VM to boot. This can take a few minutes.
[test] VM booted and ready for use!
[test] Configuring and enabling network interfaces...
[test] Mounting shared folders...
[test] -- v-root: /vagrant
[test] -- files: /etc/puppet/files
[test] -- v-pp-m0: /tmp/vagrant-puppet/modules-0
[test] -- manifests: /tmp/vagrant-puppet/manifests
[test] Running provisioner: Vagrant::Provisioners::Puppet...
[test] Running Puppet with /tmp/vagrant-puppet/manifests/default.pp...
stdin: is not a tty
debug: importing
'/tmp/vagrant-puppet/modules-0/nullmailer/manifests/init.pp' in environment
production
Could not parse for environment production: Syntax error at ')' at
/tmp/vagrant-puppet/modules-0/nullmailer/manifests/init.pp:9 on node lucid64.lan
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
cd /tmp/vagrant-puppet/manifests && puppet apply --verbose --debug
--fileserverconfig=/vagrant/fileserver.conf --modulepath
'/tmp/vagrant-puppet/modules-0' /tmp/vagrant-puppet/manifests/default.pp
Note I have done:
$ vagrant box add lucid64 http://files.vagrantup.com/lucid64.box
Before 'vagrant up'
HTH to reproduce and fix.
Thanks,
Anand
----------------------------------------
Bug #14423: syntax error when , is incuded
https://projects.puppetlabs.com/issues/14423#change-65243
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.