架构如下:
==============================
manifests
=============================
1,at /etc/puppet/modules
-----------------------
init.pp
+++++++++++++
class cacti (
$monitor_ip = "xxx.xxx.xxx.xxx",
$snmp_passwd = "xxxx"
){
case $operatingsystem {
centos:{
include cacti::base
include cacti::diskio
include cacti::service
}
}
}
----------------------
base.pp
++++++++++
class cacti::base {
package {"net-snmp":
ensure => present
}
package {"net-snmp-utils":
ensure => present,
require => package["net-snmp"]
}
}
-----------------------------------
时间: 2025-01-27 08:38:11