Vagrant Node.js模块赢得';t使用傀儡/流浪汉重新安装

Vagrant Node.js模块赢得';t使用傀儡/流浪汉重新安装,vagrant,puppet,librarian-puppet,Vagrant,Puppet,Librarian Puppet,以前我有一个类似的配置,但当我把hiera添加到我的木偶构建中时,我开始出现问题。运行vagrant provision后,我当前遇到的错误如下: ==> default: [vagrant-hostsupdater] Checking for host entries ==> default: [vagrant-hostsupdater] found entry for: 192.168.33.10 local.mysite ==> default: Configurin

以前我有一个类似的配置,但当我把hiera添加到我的木偶构建中时,我开始出现问题。运行
vagrant provision
后,我当前遇到的错误如下:

==> default: [vagrant-hostsupdater] Checking for host entries
==> default: [vagrant-hostsupdater]   found entry for: 192.168.33.10 local.mysite
==> default: Configuring cache buckets...
==> default: Running provisioner: puppet...
==> default: Running Puppet with app.pp...
==> default: stdin: is not a tty
==> default: Error: Could not find class nodejs for local.mysite on node local.mysite
==> default: Error: Could not find class nodejs for local.mysite on node local.mysite
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
我的流浪配置是:

# -*- mode: ruby -*-
# vi: set ft=ruby :
require "yaml"

# Load yaml configuration
config_file = "#{File.dirname(__FILE__)}/config/vm_config.yml"
default_config_file = "#{File.dirname(__FILE__)}/config/.vm_config_default.yml"

vm_external_config = YAML.load_file(config_file)

# Configure Vagrant
Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/trusty64"

  config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"

  config.vm.network :private_network, ip: vm_external_config["ip"]
  config.vm.hostname = vm_external_config["hostname"]
  config.vm.network "forwarded_port", guest: vm_external_config["port"], host: 2368

  config.vm.synced_folder vm_external_config["ghost_path"], "/var/www/mysite.com", :nfs => true

  config.vm.provider :virtualbox do |vb|
    vb.customize ["modifyvm", :id, "--memory", vm_external_config["memory"]]
  end

  config.cache.scope = :box

  config.librarian_puppet.placeholder_filename = ".gitkeep"

  config.vm.provision :puppet do |puppet|
    puppet.hiera_config_path = "puppet/hiera/hiera.yaml"
    puppet.manifests_path = "puppet/manifests"
    puppet.manifest_file = "app.pp"
    puppet.module_path = "puppet/modules"
    puppet.facter = {
        "environment" => ENV['ENV'] ? ENV['ENV'] : 'local'
    }
  end
end
我的源代码树看起来是这样的(除了自定义博客模块和hiera配置的文件夹结构之外,大部分都不相关):

hiera.yaml:

---
:backends:
  - yaml

:yaml:
  :datadir: /vagrant/hieradata

:hierarchy:
  - "%{::environment}/site
  - common
普通亚马尔

--
classes:
  - site
本地/site.yaml

--
:site:
  environment: local
  name: local.mysite
  mailserver: local.mail.mysite
blog/manifests/app.pp

class blog::app {

  class { 'nodejs':
    version => 'v0.10.25',
  } ->
  package { 'pm2':
    ensure => present,
    provider => 'npm',
    require => Class['nodejs'],
  }
}
木偶锉

forge 'https://forgeapi.puppetlabs.com'

mod 'willdurand/nodejs', '1.9.4'
基本上,我的问题是我的puppet安装没有重新安装nodejs(我以前使用的是
rm-rf puppet/modules/nodejs

有人知道puppet现在如何或为什么拒绝在puppet/modules目录中安装nodejs puppet模块吗

仅供参考-我已使用
puppet模块安装willdurand/nodejs安装了willdurand/nodejs模块


任何帮助都是非常感谢的-这几天来我一直在用头撞砖墙

流浪图书管理员傀儡使用
Puppetfile
安装您的傀儡模块,因此它应该安装

确保插件已安装

$ vagrant plugin list
vagrant-librarian-puppet (0.9.2)
....
如果您没有看到插件,请确保安装它

$ vagrant plugin install vagrant-librarian-puppet

似乎你在使用图书管理员,那么你能确认你安装了插件
vagrant library puppet
hi Frédéric-你能扩展一下吗?我是puppet的第一次用户。我一直在从约翰·阿伦德尔(John Arundel)的《木偶3》介绍书开始工作,但大部分工作都是从网络上的粗略示例和我发现的其他GitHub示例中拼凑而成的,所以完全有可能我已经完成了任务。我相信我已经完成了,但我会在回家后再次检查。出于兴趣,我是否仍然需要手动安装puppet模块,例如“puppet模块安装willdurand/nodejs”?或者流浪的傀儡图书管理员会为我这样做吗?不,图书管理员的想法是它会为您这样做-您设置所有必要的模块,它会在任何资源调配完成之前为您运行安装傀儡模块。更进一步说,我个人还是更喜欢使用一个shell脚本来运行install puppet模块,因为它不依赖我的团队成员工作站上的另一个插件,但这是一个品味和如何使用itOkay的问题-我想我的问题是我手动安装了库,它不会安装,因为它认为它存在。我将尝试卸载它并重新运行vagrant provision步骤以确认-thanksit确实可能是问题所在。您可以从头开始重新配置一个新的VM。我不确定是否应该有一些错误日志,或者不告诉您模块无法安装,因为它已经存在或类似的东西
$ vagrant plugin install vagrant-librarian-puppet