再現手順
/ etc/puppet/puppet.conf
_[main]
parser = future
_
site.pp
_$systems = [
'system01',
'system02',
'system03',
'system04',
'system05',
'system06',
'system07',
'system08',
'system09',
'system10'
]
each($systems) |$value| { notify $value }
_
結果
_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
_
問題の解決を試みます
Could not parse for environment production: This Name is not productive
_も_A non productive construct may only be placed last in a block/sequence
_もグーグルで検索しても、問題を解決する答えは得られませんでした。each($systems) |$value| { notify $value }
をファイルの最後に移動しても、問題は解決しませんでしたeach($systems) |$value| { notify $value }
をeach($systems) |$value| { notify {$value:} }
に変更した後に機能します。