diff options
author | Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> | 2010-02-08 15:14:28 -0500 |
---|---|---|
committer | Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> | 2010-02-08 15:14:28 -0500 |
commit | 57472843b5703570eaf4549ac6fb05ba211b247b (patch) | |
tree | eee2b897a4663a9ddd4eea523c8574930c24da54 /manifests/nsca | |
parent | 4257fa1d29f3251960cc40f9651bbedb40d3d531 (diff) |
add basic nsca server/client classes and provide default config
Diffstat (limited to 'manifests/nsca')
-rw-r--r-- | manifests/nsca/client.pp | 14 | ||||
-rw-r--r-- | manifests/nsca/server.pp | 20 |
2 files changed, 34 insertions, 0 deletions
diff --git a/manifests/nsca/client.pp b/manifests/nsca/client.pp new file mode 100644 index 0000000..b4ca878 --- /dev/null +++ b/manifests/nsca/client.pp @@ -0,0 +1,14 @@ +class nagios::nsca::client { + + package { 'nsca': ensure => installed } + + file { '/etc/send_nsca.cfg': + source => [ "puppet://${server}/site-nagios/nsca/{$fqdn}/send_nsca.cfg", + "puppet://${server}/site-nagios/nsca/send_nsca.cfg", + "puppet://${server}/nagios/nsca/send_nsca.cfg" ], + owner => 'nagios', + group => 'nogroup', + mode => '400', + } + +} diff --git a/manifests/nsca/server.pp b/manifests/nsca/server.pp new file mode 100644 index 0000000..e69c5b3 --- /dev/null +++ b/manifests/nsca/server.pp @@ -0,0 +1,20 @@ +class nagios::nsca::server { + + package { 'nsca': ensure => installed } + + service { 'nsca': + ensure => running, + hasstatus => false, + hasrestart => true, + } + + file { '/etc/nsca.cfg': + source => [ "puppet://${server}/site-nagios/nsca/{$fqdn}/nsca.cfg", + "puppet://${server}/site-nagios/nsca/nsca.cfg", + "puppet://${server}/nagios/nsca/nsca.cfg" ], + owner => 'nagios', + group => 'nogroup', + mode => '400', + } + +} |