I have a shell script to install nodejs module packages which should be execute after all packages are installed. I defined a stage 'last' after the Stage[main] here is my code
stage { 'last': }
Stage[main] -> Stage[last]
class npm {
stage => last,
file { '/tmp/nodejs.sh':
source => 'puppet:///modules/npm/nodejs.sh',
ensure => present,
}
exec { 'install web development nodejs packages':
command => '/tmp/nodejs.sh',
user => "root",
require => Package['nodejs', 'npm']
}
}
However, it return an error
==> default: Error: Could not parse for environment production: Syntax error at '=>'; expected '}' at /tmp/vagrant-puppet-/manifests/init.pp:90 on node local.d ev
the line 90 is pointed at "stage => last,"