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/