diff options
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/nsca.pp | 3 | ||||
-rw-r--r-- | manifests/nsca/client.pp | 14 | ||||
-rw-r--r-- | manifests/nsca/server.pp | 20 |
3 files changed, 37 insertions, 0 deletions
diff --git a/manifests/nsca.pp b/manifests/nsca.pp new file mode 100644 index 0000000..d5be298 --- /dev/null +++ b/manifests/nsca.pp @@ -0,0 +1,3 @@ +class nagios::nsca { + include nagios::nsca::server +} 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', + } + +} |