我有搜索許多傀儡模塊的問題,看到了答案,但它仍然不能解決我的問題。我是傀儡新手,並已安裝木偶大師和客戶端。我/etc/puppet/manifests/site.pp包含如何在傀儡客戶端使用傀儡模塊?
node 'dn1.test.com'{
include custom_utils
}
node 'client.test.com'{
include custom_utils
}
class custom_utils {
package { ["nmap","telnet","vim-enhanced","traceroute"]:
ensure => latest,
allow_virtual => false,
}
}
,當我運行
木偶代理-t
木偶客戶端工作正常,並安裝所有包。
現在,當我嘗試測試模塊時,我無法做到這一點。
安裝模塊
木偶模塊安裝puppetlabs-mysql的
我的木偶模塊顯示
puppet module list
/etc/puppet/modules
├── nanliu-staging (v1.0.3)
├── puppetlabs-mysql (v3.3.0)
└── puppetlabs-stdlib (v4.6.0)
/usr/share/puppet/modules (no modules installed)
,我修改上面site.pp在推薦後此網站如下
node 'dn1.test.com'{
include custom_utils
}
node 'client.test.com'{
include custom_utils
require puppetlabs-mysql
}
class custom_utils {
package { ["nmap","telnet","vim-enhanced","traceroute"]:
ensure => latest,
allow_virtual => false,
}
}
但是當我運行木偶客戶
木偶代理-t
我得到
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class puppetlabs-mysql for client.test.com on node client.test.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
別人做什麼,我必須做的,你提供的任何想法將會非常有幫助。非常感謝您的幫助。