vagrant - 直接从克隆的存储库使用 puppet 模块

标签 vagrant puppet

我正在尝试在 vagrant 设置中使用 puppet 模块。在解决这个问题时,我试图解决这个stackoverflow question 。 我将 puppet 模块存储库(apt 模块和 nodejs 模块)克隆到子文件夹中 在vagrantfile中设置puppet模块路径

并包含 puppet 模块并在 puppet list 文件中调用它们,例如:

class { 'apt':
}
include apt

class{ 'apt':} -> apt::builddep { ["python-imaging","python-lxml"]:
    require => Class['apt'] 
 }

我想知道,当我只是git clone存储库时,也许我缺少一个安装/构建步骤?这可能吗?

错误信息:

←[0;37mdebug: importing '/tmp/vagrant-puppet/modules-0/apt/manifests/init.pp' in
 environment production←[0m
←[0;37mdebug: Automatically imported apt from apt into production←[0m
←[0;37mdebug: importing '/tmp/vagrant-puppet/modules-0/apt/manifests/params.pp'
in environment production←[0m
←[0;37mdebug: Automatically imported apt::params from apt/params into production
←[0m
←[0;37mdebug: importing '/tmp/vagrant-puppet/modules-0/apt/manifests/update.pp'
in environment production←[0m
←[0;37mdebug: Automatically imported apt::update from apt/update into production
←[0m
Unknown function validate_bool at /tmp/vagrant-puppet/modules-0/apt/manifests/in
it.pp:36 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-exitco
des || [ $? -eq 2 ]

最佳答案

您缺少stdlib模块,它至少是 apt 的依赖项模块,除其他外,它还提供 validate_bool函数 Puppet 找不到。

您可以找到stdlib模块在这里:
https://github.com/puppetlabs/puppetlabs-stdlib

使用 Puppet 模块安装工具,而不仅仅是克隆单个存储库。

http://docs.puppetlabs.com/puppet/latest/reference/modules_installing.html

或者更好的是使用librarian-puppet。

关于vagrant - 直接从克隆的存储库使用 puppet 模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17570554/

相关文章:

Vagrant 尝试执行能力 'mount_virtualbox_shared_folder' 错误

ruby - 将命令行参数传递给 vagrant shell 脚本配置器

ubuntu - 通过 Apt 模块使用 puppet 在 Ubuntu 上安装 spotify-client

linux - 如何使用 bosh-lite 在 vagrant 上运行的 cloudfoundry 中部署应用程序?

hadoop - hadoop fs -ls 上的连接被拒绝

vagrant - Vagrant 禁用访客添加

powershell - puppet 5.3.3和Powershell-返回1而不是[0]之一

xml - Puppet Augeas - 无法更新包含 CDATA 的 xml 节点中的值

java - Puppet安装冗余的java 7