I have the following manifest:
include nodejs
package { 'serve':
ensure => latest,
provider => 'npm',
}
I am using the puppetlab node.js module:
http://forge.puppetlabs.com/puppetlabs/nodejs
Vagrantfile:
Vagrant::Config.run do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.provision :puppet do |puppet|
puppet.manifests_path = '~/work/environments/default/'
puppet.manifest_file = 'site.pp'
puppet.module_path = '~/work/environments/default/modules'
end
end
When I run vagrant up
I am getting the following error:
[default] Running provisioner: Vagrant::Provisioners::Puppet...
[default] Running Puppet with /tmp/vagrant-puppet/manifests/site.pp...
stdin: is not a tty
err: /Stage[main]//Package[serve]/ensure: change from absent to latest failed: Could not update: Got nil value for ensure at /tmp/vagrant-puppet/manifests/site.pp:6
notice: /Stage[main]/Nodejs/Package[nodejs]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Nodejs/Package[npm]/ensure: ensure changed 'purged' to 'present'
notice: Finished catalog run in 14.89 seconds
At first I thought maybe it's trying to install the 'serve' module before npm installed so I tried require => Package[npm]
but that gave the same result.
So could anybody shine some light on why it's not installing the 'serve' module?