From 1e7b51004868a762f577831e686d1b851e2b08c2 Mon Sep 17 00:00:00 2001 From: Jerome Charaoui Date: Tue, 1 Dec 2009 13:33:36 -0500 Subject: Add support for Debian; split up package defaults and create new nagios::default resource; add support for lighttpd and headless httpd configurations; move common commands definitions into nagios::commands --- manifests/centos.pp | 40 ++-------------------------------------- 1 file changed, 2 insertions(+), 38 deletions(-) (limited to 'manifests/centos.pp') diff --git a/manifests/centos.pp b/manifests/centos.pp index 95c8749..6581b7a 100644 --- a/manifests/centos.pp +++ b/manifests/centos.pp @@ -1,47 +1,11 @@ class nagios::centos inherits nagios::base { + package { [ 'nagios-plugins', 'nagios-plugins-smtp','nagios-plugins-http', 'nagios-plugins-ssh', 'nagios-plugins-udp', 'nagios-plugins-tcp', 'nagios-plugins-dig', 'nagios-plugins-nrpe', 'nagios-plugins-load', 'nagios-plugins-dns', 'nagios-plugins-ping', 'nagios-plugins-procs', 'nagios-plugins-users', 'nagios-plugins-ldap', 'nagios-plugins-disk', 'nagios-plugins-swap', 'nagios-plugins-nagios', 'nagios-plugins-perl', 'nagios-plugins-ntp', 'nagios-plugins-snmp' ]: ensure => 'present', - notify => Service[nagios], + notify => Service['nagios'], } Service[nagios]{ hasstatus => true, } - - # default cmd file from rpm - # don't forget it to add to the puppet paths - file { nagios_commands_cfg: - path => "/etc/nagios/commands.cfg", - source => [ "puppet://$server/modules/site-nagios/configs/${fqdn}/commands.cfg", - "puppet://$server/modules/site-nagios/configs/${operatingsystem}/commands.cfg", - "puppet://$server/modules/nagios/configs/${operatingsystem}/commands.cfg" ], - owner => 'root', - group => 0, - mode => '0644', - notify => Service[nagios], - } - # default file from rpm - file { nagios_localhost_cfg: - path => "/etc/nagios/localhost.cfg", - source => [ "puppet://$server/modules/site-nagios/configs/${fqdn}/localhost.cfg", - "puppet://$server/modules/site-nagios/configs/${operatingsystem}/localhost.cfg", - "puppet://$server/modules/nagios/configs/${operatingsystem}/localhost.cfg" ], - owner => 'root', - group => 0, - mode => '0644', - notify => Service[nagios], - } - file{"/etc/nagios/private": - source => "puppet://$server/modules/common/empty", - ensure => directory, - purge => true, - recurse => true, - notify => Service[nagios], - mode => '0750', owner => root, group => nagios; - } - file{"/etc/nagios/private/resource.cfg": - source => "puppet://$server/modules/nagios/configs/${operatingsystem}/private/resource.cfg.${architecture}", - notify => Service[nagios], - owner => root, group => nagios, mode => '0640'; - } } -- cgit v1.2.3