All pastes #952019 Raw Edit

snmpd.pp

public text v1 · immutable
#952019 ·published 2008-03-21 20:57 UTC
rendered paste body
class snmp_class {
   file {
      "/etc/snmp/snmpd.conf":
         source => "puppet://ondemand-admin3.sugarondemand.pvt/files/etc/snmpd.conf",
         mode => 755,
         alias => snmpconf;
      "/etc/snmp/omreport_checkraid.pl":
         source => "puppet://ondemand-admin3.sugarondemand.pvt/files/etc/omreport_checkraid.pl",
         mode => 755,
         alias => checkraid,
         notify => Exec ["SNMPInstall"];
      "/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",
         refreshonly => true;
      "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",
         refreshonly => true;
   }
}

node x {
   include snmp_class
}