In order to facilitate the combination with puppet, so the original compiled with the source code, all changed to use Rpmbuild packaged, in their own built source, this article will also explain how to create local sources.
The package Nrpe and Nagios-plugins are generated by the spec of the previous article.
The old rules, first on the architecture (PS: actually all the same-):
1.init.pp
2.web.pp
Class Nagios::web ($nagiospluginsversion = "1.4.16-10", $nrpeversion = "2.13-10") {file {"sa"): Path => "/root/sa", ensure => directory,} package {"X"
inetd ": Ensure => present,} package {" Nagios-plugins ": Ensure => $nagiospluginsversion,} package {"Nrpe": Ensure => ;
$nrpeversion, require => package["Nagios-plugins"],} file {"Nrpe.cfg":
Mode => 0644, owner => Nagios, group => Nagios, Path => "/usr/local/nagios/etc/nrpe.cfg", Require => package["Nrpe"], content
=> template (' Nagios/web-nrpe.erb '), notify => service[' xinetd '],} file {"Nrpe":
Mode => 0644, owner => root, group => root, PA Th => "/etc/xinetd.d/nrpe", Content => template (' Nagios/nrpe.erb '), Require =&G T package["Nrpe"], notify => service[' xinetd '],} Service {"Xinet D ": Ensure => running, enable => true, subscribe => file[" Nrpe "," Nrpe.cfg "],}}