aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2010-01-05 10:34:16 -0500
committerMicah Anderson <micah@riseup.net>2010-01-05 10:34:16 -0500
commit47733659ae1c79cd8249096455f4b0d863dcad75 (patch)
tree951942daec59eefd8da738d074d2b7268a3a07ab /manifests
parent198b84bfbe5396e289764a03f9996845d3e47b86 (diff)
downloadpuppet-backupninja-47733659ae1c79cd8249096455f4b0d863dcad75.tar.gz
puppet-backupninja-47733659ae1c79cd8249096455f4b0d863dcad75.tar.bz2
let the user override the nagios2_description, which is necessary for
multiple backup defines on one host
Diffstat (limited to 'manifests')
-rw-r--r--manifests/rdiff.pp3
-rw-r--r--manifests/server.pp9
2 files changed, 9 insertions, 3 deletions
diff --git a/manifests/rdiff.pp b/manifests/rdiff.pp
index 38a975d..587c02d 100644
--- a/manifests/rdiff.pp
+++ b/manifests/rdiff.pp
@@ -25,7 +25,7 @@ define backupninja::rdiff(
"/home", "/usr/local/*bin", "/var/lib/dpkg/status*" ],
$vsinclude = false, $keep = 30, $sshoptions = false, $options = '--force', $ssh_dir_manage = true,
$ssh_dir = false, $authorized_keys_file = false, $installuser = true, $installkey = true, $key = false,
- $backuptag = false, $home = false, $backupkeytype = "rsa", $backupkeystore = false, $extras = false)
+ $backuptag = false, $home = false, $backupkeytype = "rsa", $backupkeystore = false, $extras = false, $nagios2_description = 'backups')
{
include backupninja::client::rdiff_backup
@@ -49,6 +49,7 @@ define backupninja::rdiff(
manage_ssh_dir => $ssh_dir_manage, ssh_dir => $ssh_dir, key => $key,
authorized_keys_file => $authorized_keys_file, installuser => $installuser,
backuptag => $real_backuptag, keytype => $backupkeytype, backupkeys => $backupkeystore,
+ nagios2_description => $nagios2_description
}
backupninja::client::key
diff --git a/manifests/server.pp b/manifests/server.pp
index 291ffed..a64e854 100644
--- a/manifests/server.pp
+++ b/manifests/server.pp
@@ -62,7 +62,7 @@ class backupninja::server {
define sandbox(
$user = false, $host = false, $installuser = true, $dir = false, $manage_ssh_dir = true,
$ssh_dir = false, $authorized_keys_file = false, $key = false, $keytype = 'dss', $backupkeys = false, $uid = false,
- $gid = "backupninjas", $backuptag = false)
+ $gid = "backupninjas", $backuptag = false, $nagios2_description = "backups")
{
$real_user = $user ? {
@@ -95,9 +95,14 @@ class backupninja::server {
default => $backuptag,
}
+ $real_nagios2_description = $nagios2_description ? {
+ false => "backups",
+ default => $nagios2_description,
+ }
+
if $nagios_server {
# configure a passive service check for backups
- nagios2::passive_service { "backups-$name": nagios2_host_name => $real_host, nagios2_description => 'backups', servicegroups => "backups" }
+ nagios2::passive_service { "backups-$name": nagios2_host_name => $real_host, nagios2_description => $real_nagios2_description, servicegroups => "backups" }
}
if !defined(File["$real_dir"]) {