Using Future Parser on Puppet v3.8.2

67 views
Skip to first unread message

Sans

unread,
Jan 29, 2016, 3:44:19 PM1/29/16
to Puppet Users

Hi there,

Need to iterate over an arry, so was trying the Future Parser. Using a very simple example:



$alpha
= ['a','b','c']
each
($alpha) |String $value| { notice( "Hi there, ${value}" ) }

but getting this error:
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not match |String at......

Not using the strict variable type also doesn't help, I get error at  |$value that time.

I also tried using: $alpha.each |String $value| { notice( "Hi there, ${value}" ) }

and get the error like:
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Syntax error at '.'; expected '}' at....


I do have parser=future defined in the puppet.conf on my PM. what am I still missing?


-San

Martin Alfke

unread,
Jan 30, 2016, 5:58:33 AM1/30/16
to puppet...@googlegroups.com
Have you restarted puppet master process after adding future_parser to puppet.conf?

Best,
Martin

>
> -San
>
> --
> 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...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/adae1bd7-a596-43c0-b38e-5aa164de2dc9%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Henrik Lindberg

unread,
Jan 31, 2016, 11:32:41 AM1/31/16
to puppet...@googlegroups.com
On 2016-29-01 21:44, Sans wrote:
>
> Hi there,
>
>
> Need to iterate over an arry, so was trying the Future Parser. Using a
> very simple example:
>
>
> |
>
> $alpha =['a','b','c']
> each($alpha)|String$value|{notice("Hi there, ${value}")}
> |
>
> but getting this error:
> *Error: Could not retrieve catalog from remote server: Error 400 on
> SERVER: Could not match |String at......*
>
> Not using the strict variable type also doesn't help, I get error at
> *|*|*$value*that time.|
>
> I also tried using: ||||$alpha.each |String$value|{notice("Hi there,
> ${value}")}|||||
>
> and get the error like:
> *Error: Could not retrieve catalog from remote server: Error 400 on
> SERVER: Syntax error at '.'; expected '}' at....*
>
>
> I do have parser=future defined in the puppet.conf on my PM. what am I
> still missing?
>

Since you in the second example got a syntax error on the '.' that is an
indication that your configuration is not what you think it is.
i.e. future parser is not turned on.

If you change the place where you wrote parser=future, to parser=current
you probably get exactly the same error. That indicates that the
configuration file, or setting of parser= is in the wrong place.

- henrik

--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

Sans

unread,
Jan 31, 2016, 11:37:46 AM1/31/16
to Puppet Users

yes, so many times.

-S

Sans

unread,
Feb 1, 2016, 5:00:56 PM2/1/16
to Puppet Users
Thanks Henrik, for giving me the clue.

It was really silly: My PM is self-managed, i.e. the puppet-agent also runs on the PM, which maintains the puppet.conf and it was overriding the parser=future, every time I was restating Apache after adding that bit manually.

Sorry guys for the noise and false alarm. It's working now.

-S 

Henrik Lindberg

unread,
Feb 1, 2016, 9:15:50 PM2/1/16
to puppet...@googlegroups.com
On 2016-01-02 23:00, Sans wrote:
> Thanks Henrik, for giving me the clue.
>
> It was really silly: My PM is self-managed, i.e. the puppet-agent also
> runs on the PM, which maintains the puppet.conf and it was overriding
> the parser=future, every time I was restating Apache after adding that
> bit manually.
>
> Sorry guys for the noise and false alarm. It's working now.

:-)

Cheers!
Reply all
Reply to author
Forward
0 new messages