Vagrant使用Puppet进行配置失败

3

你好,我在http://vmg.slynett.com/上生成了一个虚拟机。

虚拟机工作正常,但是没有安装任何东西。 我不知道为什么vagrant provision失败了。

vagrant provision
[default] Running provisioner: Vagrant::Provisioners::Shell...
stdin: is not a tty
Europe/Paris

Current default time zone: 'Europe/Paris'
Local time is now:      Fri Jun 28 13:15:42 CEST 2013.
Universal Time is now:  Fri Jun 28 11:15:42 UTC 2013.

[default] Running provisioner: Vagrant::Provisioners::Puppet...
[default] Running Puppet with /tmp/vagrant-puppet/manifests/base.pp...
stdin: is not a tty
Warning: Could not retrieve fact fqdn
Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults
Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type concat at /tmp/vagrant-puppet/modules-0/apache/manifests/init.pp:130 on node dev
Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type concat at /tmp/vagrant-puppet/modules-0/apache/manifests/init.pp:130 on node dev
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 --modulepath '/tmp/vagrant-puppet/modules-0' /tmp/vagrant-puppet/manifests/base.pp --detailed-exitcodes || [ $? -eq 2 ]

我使用的是mac OS X 10.8.3系统,virtualbox版本为4.2.6,Vagrant版本为1.2.2。


你的 init.pp 文件在第 130 行有什么内容?更多代码会更有帮助。 - Vishal Biyani
init.pp:https://gist.github.com/shima5/5884040 Vagrantfile:https://gist.github.com/shima5/5884050 - rpg600
只有22行,哪里可以找到第130行?? :D - Vishal Biyani
这是第一个链接 https://gist.github.com/shima5/5884040 - rpg600
2个回答

3

我通过将 concatfile_concat puppet 模块添加到 puppet 模块路径来解决了这个问题。我通常将所有需要的 puppet 模块作为 git 子模块放在 vagrant 项目的 puppet/modules 下,因此要添加 concatfile_concat 模块,我会执行以下操作:

git submodule add https://github.com/puppetlabs/puppetlabs-concat.git puppet/modules/concat
git submodule add https://github.com/electrical/puppet-lib-file_concat.git puppet/modules/file_concat

请注意,concat模块是来自puppetlabs官方的模块,而file_concat模块是在concat中使用的(它应该会被自动安装,但我并没有成功,这也可能是你的问题)。

3
看起来你正在参考 ripenaar/concat 的 concat 模块,当资源不存在(即未安装或不在模块路径中)时通常会抛出这样的错误。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接