rendered paste bodyclass snmp_class {
# sync snmpd.conf
file { "/etc/snmp/snmpd.conf":
source => "puppet://ondemand-admin3.sugarondemand.pvt/files/etc/snmpd.conf",
mode => 755,
alias => snmpconf
}
file { "/etc/snmp/omreport_checkraid.pl":
source => "puppet://ondemand-admin3.sugarondemand.pvt/files/etc/omreport_checkraid.pl",
mode => 755,
alias => checkraid,
notify => Exec ["SNMPInstall"]
}
file { "/usr/share/selinux/targeted/snmp.pp":
source => "puppet://$server/files/etc/snmp.pp",
mode => 644,
alias => selinux_snmp,
notify => Exec ["SelinuxSnmp"]
}
}
exec { "SelinuxSnmp":
command => "/usr/sbin/semodule -i /usr/share/selinux/targeted/snmp.pp",
subscribe => File["/usr/share/selinux/targeted/snmp.pp"],
refreshonly => true;
}
exec { "SNMPInstall":
command => "/usr/bin/yum -y install snmpd && /etc/init.d/snmpd restart && /usr/bin/chcon system_u:object_r:bin_t /etc/snmp/omreport_checkraid.pl",
subscribe => File["/etc/snmp/omreport_checkraid.pl"],
refreshonly => true;
}