1

Steps to reproduce

  1. Enable future parser as described in this documentation

/etc/puppet/puppet.conf

[main]
parser = future
  1. Add lambda code to a pp file

site.pp

$systems = [
  'system01',
  'system02',
  'system03',
  'system04',
  'system05',
  'system06',
  'system07',
  'system08',
  'system09',
  'system10'
]

each($systems) |$value| { notify $value }
  1. Run puppet

Outcome

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Could not parse for environment production: This Name is not productive. 
A non productive construct may only be placed last in a block/sequence at 
/etc/puppet/manifests/site.pp:38:27 on node vm-one.domain
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Attempts to solve issue

  1. Googling neither Could not parse for environment production: This Name is not productive nor A non productive construct may only be placed last in a block/sequence resulted in an answer that solves the issue.
  2. Moving each($systems) |$value| { notify $value } to the end of the file did not solve the issue either
030
  • 5,731
  • 12
  • 61
  • 107
  • Unsure if this is the real problem, but that shouldn't be `notify`. It should be `notice`. – faker Jan 12 '15 at 21:17
  • Which line is it referencing? Did you make the config change to enable the future parser on the master as well as the agent node? Did you restart the services after you made the change? – Shane Madden Jan 12 '15 at 22:40
  • @ShaneMadden Implementing it in the [agent] section and restarting the services did not work. – 030 Jan 17 '15 at 13:22

1 Answers1

0

It works after changing each($systems) |$value| { notify $value } to each($systems) |$value| { notify {$value:} }:

030
  • 5,731
  • 12
  • 61
  • 107