我有以下清单:
include nodejs
package { 'serve':
ensure => latest,
provider => 'npm',
}
我正在使用 puppetlab node.js 模块:
http://forge.puppetlabs.com/puppetlabs/nodejs
流浪文件:
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
当我运行vagrant up
时,我收到以下错误:
[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
起初我以为它可能是在安装 npm 之前尝试安装“服务”模块,所以我尝试require => Package[npm]
了,但结果相同。
那么有人能解释一下为什么它没有安装“服务”模块吗?