0

使用 puppet 安装石墨服务器时出现以下错误

为石墨安装的木偶模块

puppet module install dwerder-graphite

这是graphite.pp的内容

cat graphite.pp 

输出

class {'graphite':
}

这是命令

puppet apply graphite.pp

我收到的错误:

warning: Scope(Class[Graphite::Params]): Could not look up qualified variable 'graphite::gr_web_group'; class graphite has not been evaluated at /etc/puppet/modules/graphite/manifests/params.pp:97
warning: Scope(Class[Graphite::Params]): Could not look up qualified variable 'graphite::gr_web_group'; class graphite has not been evaluated at /etc/puppet/modules/graphite/manifests/params.pp:97
warning: Scope(Class[Graphite::Params]): Could not look up qualified variable 'graphite::gr_web_user'; class graphite has not been evaluated at /etc/puppet/modules/graphite/manifests/params.pp:103
warning: Scope(Class[Graphite::Params]): Could not look up qualified variable 'graphite::gr_web_user'; class graphite has not been evaluated at /etc/puppet/modules/graphite/manifests/params.pp:103
Failed to parse template graphite/opt/graphite/conf/carbon.conf.erb:
  Filepath: /usr/lib/ruby/site_ruby/1.8/puppet/parser/scope.rb
  Line: 459
  Detail: undefined method `[]' for #<Puppet::Parser::Scope:0x7f82caef1e98>
 at /etc/puppet/modules/graphite/manifests/config.pp:171 on node test

我在 RHEL 上运行

 cat /etc/redhat-release 
Red Hat Enterprise Linux Workstation release 6.4 (Santiago)
4

1 回答 1

0

你把文件放在哪里graphite.pp?这是测试 Puppetlabs 推荐的模块的方法。

如果你的 puppet 模块是 /etc/puppet/modules,那么在其下创建 tests 文件夹,并创建graphite.pp,然后在其中添加内容:

include graphite

当您手动应用更改时,请运行以下命令:

cd /etc/puppet/modules/tests
puppet apply --modulepath=/etc/puppet/modules graphite.pp
于 2015-01-09T19:25:16.997 回答