簡體   English   中英

使用類時出現Puppet錯誤

[英]Puppet error when using classes

我開始使用puppet管理許多服務器,問題是每當我嘗試使用類時, 新的遺物例如:

node 'mynode' {
     class {'newrelic::server::linux':
       newrelic_license_key => '***',
      }
 }

它失敗,並返回以下錯誤:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Could not find declared class newrelic::server::linux at /etc/puppet/manifests/site.pp:3 on node mynode

我在主fsalum-newrelic上安裝了fsalum-newrelic ,在使用文件,軟件包,服務等時一切正常。我做錯了什么?

目錄編譯器將在newrelic/manifests/server/linux.pp相對於模塊路徑中每個目錄的類newrelic::server::linux (注意: newrelicfsalum-newrelic 。)確保你確實安裝了模塊,使得這樣的文件存在於你的模塊路徑中,並確保它可以被puppetmaster進程讀取。

另請注意,“puppetmaster進程可讀”不僅僅意味着文件本身的所有權和權限。 它還涉及該文件路徑中所有目錄的所有權和權限,以及可能的其他形式的訪問控制,例如ACL和SELinux conext和策略。

使用像“locate”這樣的unix實用程序,找出實際安裝新puppet forge模塊的位置。

然后查看“basemodulepath”中的/etc/puppet/puppet.conf並檢查它所安裝的位置是否在路徑中

這是我的basemodulepath

basemodulepath = $confdir/environments/production/modules:$confdir/environments/production/local_modules:/etc/puppet/modules

我正在使用的外部模塊位於/ etc / puppet / modules或/ etc / puppet / enviroments / production / modules中

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM