Hayo.

Other than s/notice/notify/ for best effect, that works a treat when I 
invoke it with puppet apply --parser future test.pp (added an 'include 
mytestclass' for invocation, but that's it).

The parser=future is required on whatever node is doing the catalog 
compilation, and needs to go in [main] for best effect, I believe 
(certainly won't do anything in [agent], might be sufficient in [master])


On Monday, June 30, 2014 2:58:19 PM UTC-7, martin...@gmail.com wrote:
>
> Hi Puppet users!
>
> I'm having an issue with "each loop" on puppet, and I just can't figure 
> out what am I doing wrong, so any help will be much appreciated.
>
> Here is my test.pp example:
>
> class mytestclass {
>   $stuff = ["1", "2", "3"]
>
>   each($stuff) |$x| {
>     notice { $x: }
>   }
> }
>
> And here is the output when trying to apply it: *"Error: Could not parse 
> for environment production: Could not match |$x| at /tmp/test.pp:10"*
>
> I've "parser = future" inside my puppet.conf, ruby-rgen is installed in 
> both client and server. I'm also running it with "--parser future" on the 
> client, but no joy.
> I've  been playing with variants like "$stuff.each", using hashes, and a 
> few more desperate ideas.
>
> OS: Ubuntu 12.04
> Puppet: 3.5.1-1puppetlabs1
> ruby-rgen: 0.6.5-1puppetlabs1
>
>
> I'm clearly missing something, but can't find what.
>
> Any suggestion is welcomed!
>
> Cheers,
>
> Martin
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/a365e094-1d17-42c0-88c5-e135f24bd191%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to