【问题标题】:Using puppet module straight from a cloned repo直接从克隆的 repo 使用 puppet 模块
【发布时间】:2014-05-12 00:37:53
【问题描述】:

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

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

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 ]

【问题讨论】:

  • 我遇到了一个与此非常相似的问题,我注意到克隆的 repo 被命名为 puppetlabs-nodejs 但我必须将其重命名为 nodejs 否则我的 puppet 应用程序将找不到它。

标签: vagrant puppet


【解决方案1】:

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

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

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

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

或者更好的是使用图书管理员木偶。

【讨论】:

    猜你喜欢
    • 2022-07-08
    • 1970-01-01
    • 2021-07-16
    • 1970-01-01
    • 2023-03-25
    • 2013-08-22
    • 2022-11-02
    • 2020-11-24
    • 2018-04-13
    相关资源
    最近更新 更多