Question

I am trying to figure out whether my host has any of the ips in the $target_node_ips array

$is_target_node = $target_node_ips.reduce(false) |$memo, $entry| { has_ip_address($entry) or $memo }

however this leads to the following error

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Syntax error at '.'; expected '}' at service.pp:44

Can anybody shed some light on what's wrong? Both puppet master and the client run puppet 3.2

Was it helpful?

Solution

OK, I just figured out that reduce() is experimental in 3.2 and it requires the future parser to be enabled for it to work.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top