【问题标题】:why can't vagrant/puppet find apache?为什么 vagrant/puppet 找不到 apache?
【发布时间】:2013-06-09 14:38:35
【问题描述】:

这是运行vagrant up 时的输出。除此之外,我什至不确定哪些信息会有所帮助。

puppetlabs-apache 在 subdir: modules 中可用

使用“virtualbox”提供程序将机器“默认”设置为...

[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Fixed port collision for 22 => 2222. Now on port 2200.
[default] Fixed port collision for 80 => 8080. Now on port 2201.
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2200 (adapter 1)
[default] -- 80 => 2201 (adapter 1)
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Configuring and enabling network interfaces...
[default] Mounting shared folders...
[default] -- /vagrant
[default] -- /tmp/vagrant-puppet/manifests
[default] -- /tmp/vagrant-puppet/modules-0
[default] Running provisioner: puppet...
Running Puppet with default.pp...
stdin: is not a tty
warning: Could not retrieve fact fqdn
warning: Host is missing hostname and/or domain: precise32
Could not find class apache for precise32 at /tmp/vagrant-puppet/manifests/default.pp:5     on node precise32
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

cd /tmp/vagrant-puppet/manifests && puppet apply --verbose --debug --modulepath '/etc/puppet/modules:/tmp/vagrant-puppet/modules-0' default.pp --detailed-exitcodes || [ $? -eq 2 ]

【问题讨论】:

  • 在 VM 上创建文件夹 /tmp/vagrant-puppet/modules-0。所以也许这是一个权限问题?如果是这样,我该如何设置通过 vagrant/puppet 从主机传输的文件夹的权限?
  • 这些文件和文件夹是世界可读的,所以我认为这不是问题。
  • 你在modules文件夹中真的有apache模块吗?你也应该设置你的盒子的主机名来停止 fqdn 错误
  • Vagrant 在 /puppet/modules 中设置 puppet modules = "puppet/modules" 存在 /puppetlabs-apache 本身包含来自该 repo 的所有文件。
  • 我建议您通过以下方式改进问题:发布您的Vagrantfile 的内容并在 Puppet 配置块中添加行:puppet.options = "--debug --verbose",这样您就可以看到 Puppet 的详细输出。跨度>

标签: provisioning vagrant puppet


【解决方案1】:

您需要将文件夹的名称从 puppetlabs-apache 更改为 apache。模块名称必须与文件夹名称匹配。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-10-24
    • 2015-06-12
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多