直接从克隆的 repo 中使用 puppet 模块 [英] Using puppet module straight from a cloned repo

查看:39
本文介绍了直接从克隆的 repo 中使用 puppet 模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm trying to use puppet module in a vagrant setup. In a worked around the problem I tried to solve in this stackoverflow question. I cloned the puppet module repo (apt module and nodejs module) into a sub folder set the puppet module path in the vagrantfile

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

And include the puppet modules and call them in the puppet manifest file for example:

class { 'apt':
}
include apt

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

我想知道,当我只是 git clone 存储库时,也许我缺少安装/构建步骤?这甚至可以做到吗?

I wonder, maybe there is an install/build step I'm missing when I just git clone the repo? is this even possible to do?

错误信息:

←[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 模块的依赖项,并且它提供了 Puppet 找不到的 validate_bool 函数.

You are missing the stdlib module, which is a dependency at least of the apt module, and which provides, among other things, the validate_bool function Puppet can't find.

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

You can find the stdlib module here:
https://github.com/puppetlabs/puppetlabs-stdlib

使用 Puppet 模块安装工具,而不仅仅是克隆单个 repo.

Use the Puppet module installation tool rather than just cloning a single repo.

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

或者更好地使用图书管理员木偶.

or better yet use librarian-puppet.

这篇关于直接从克隆的 repo 中使用 puppet 模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆