summaryrefslogtreecommitdiff
path: root/manifests/centos.pp
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2009-06-13 15:41:24 +0200
committermh <mh@immerda.ch>2009-06-13 15:41:24 +0200
commit011d5e028f86e9eeba1c05e251063b45004d210e (patch)
treef17baaca735ed3a0e4f2b184da53c04d63435f66 /manifests/centos.pp
parent783ae21de4cadbd9e8e3cdf62d4b0d6039586d78 (diff)
put everything into its own file
Diffstat (limited to 'manifests/centos.pp')
-rw-r--r--manifests/centos.pp47
1 files changed, 47 insertions, 0 deletions
diff --git a/manifests/centos.pp b/manifests/centos.pp
new file mode 100644
index 0000000..a5a96fb
--- /dev/null
+++ b/manifests/centos.pp
@@ -0,0 +1,47 @@
+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],
+ }
+
+ 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/files/nagios/configs/${fqdn}/commands.cfg",
+ "puppet://$server/files/nagios/configs/${operatingsystem}/commands.cfg",
+ "puppet://$server/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/files/nagios/configs/${fqdn}/localhost.cfg",
+ "puppet://$server/files/nagios/configs/${operatingsystem}/localhost.cfg",
+ "puppet://$server/nagios/configs/${operatingsystem}/localhost.cfg" ],
+ owner => 'root',
+ group => 0,
+ mode => '0644',
+ notify => Service[nagios],
+ }
+ file{"/etc/nagios/private/":
+ source => "puppet://$server/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/nagios/configs/${operatingsystem}/private/resource.cfg.${architecture}",
+ notify => Service[nagios],
+ owner => root, group => nagios, mode => '0640';
+ }
+}