diff options
author | Micah Anderson <micah@riseup.net> | 2009-12-07 17:03:59 -0500 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2009-12-07 17:03:59 -0500 |
commit | 02f826e64e1532df82936edf33f8b9f4577cf9a2 (patch) | |
tree | 20b5cca042e51038a3e5e0cf64af668176f03570 /manifests | |
parent | bd68fde7adaf7dbe82dd7842dbfd9734d3e5c688 (diff) | |
download | puppet-backupninja-02f826e64e1532df82936edf33f8b9f4577cf9a2.tar.gz puppet-backupninja-02f826e64e1532df82936edf33f8b9f4577cf9a2.tar.bz2 |
replace koumbit-specific nagios server configuration with a $nagios_server variable that can be set. updated README to detail this information
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/server.pp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/manifests/server.pp b/manifests/server.pp index 9db950a..5eb2e15 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -12,7 +12,7 @@ class backupninja::server { '' => $fqdn, default => $backupserver_tag } - + group { "backupninjas": ensure => "present", gid => 700 @@ -29,12 +29,14 @@ class backupninja::server { mode => 0755, owner => root, group => root, } - cron { checkbackups: - command => "/usr/local/bin/checkbackups -d $real_backupdir | /usr/sbin/send_nsca -H nagios.koumbit.net -c /etc/send_nsca.cfg | grep -v 'sent to host successfully'", - user => "root", - hour => "8-23", - minute => 59, - require => [ File["/usr/local/bin/checkbackups"], Package['nsca'] ] + if $nagios_server { + cron { checkbackups: + command => "/usr/local/bin/checkbackups -d $real_backupdir | /usr/sbin/send_nsca -H $real_nagios_server -c /etc/send_nsca.cfg | grep -v 'sent to host successfully'", + user => "root", + hour => "8-23", + minute => 59, + require => [ File["/usr/local/bin/checkbackups"], Package['nsca'] ] + } } User <<| tag == "backupninja-$real_backupserver_tag" |>> @@ -81,10 +83,12 @@ class backupninja::server { false => "backupninja-$real_host", default => $backuptag, } - - # configure a passive service check for backups - nagios2::passive_service { "backups-$real_host": nagios2_host_name => $real_host, nagios2_description => 'backups', servicegroups => "backups" } + if $nagios_server { + # configure a passive service check for backups + nagios2::passive_service { "backups-$real_host": nagios2_host_name => $real_host, nagios2_description => 'backups', servicegroups => "backups" } + } + if !defined(File["$real_dir"]) { @@file { "$real_dir": ensure => directory, |