aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-02-01 11:54:54 -0200
committerSilvio Rhatto <rhatto@riseup.net>2010-02-01 11:54:54 -0200
commit2e95f11a809a541c0ed852c7b2057dc53f49818d (patch)
treecee76bfcf81aac6649811408d92f19c0ad75f285 /manifests
parent6ed1f8dfe6b16f148dde641482709958bc393815 (diff)
parent292dd6b41adde8ca018e7c9b0d976420dc8905bc (diff)
downloadpuppet-backupninja-2e95f11a809a541c0ed852c7b2057dc53f49818d.tar.gz
puppet-backupninja-2e95f11a809a541c0ed852c7b2057dc53f49818d.tar.bz2
Merge branch 'master' of git://labs.riseup.net/module_backupninja
Conflicts: manifests/rdiff.pp
Diffstat (limited to 'manifests')
-rw-r--r--manifests/client.pp7
-rw-r--r--manifests/rdiff.pp3
-rw-r--r--manifests/server.pp9
3 files changed, 14 insertions, 5 deletions
diff --git a/manifests/client.pp b/manifests/client.pp
index 95e3905..287b02f 100644
--- a/manifests/client.pp
+++ b/manifests/client.pp
@@ -32,8 +32,11 @@ class backupninja::client::defaults {
'' => true,
default => $ssh_dir_manage
}
- package { 'backupninja':
- ensure => '0.9.6-4';
+ if !defined(Package["backupninja"]) {
+ if $backupninja_ensure_version == '' { $backupninja_ensure_version = 'installed' }
+ package { 'backupninja':
+ ensure => $backupninja_ensure_version
+ }
}
file { $configdir:
ensure => directory,
diff --git a/manifests/rdiff.pp b/manifests/rdiff.pp
index 562d652..f750e23 100644
--- a/manifests/rdiff.pp
+++ b/manifests/rdiff.pp
@@ -26,7 +26,7 @@ define backupninja::rdiff(
$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,
- $subfolder = 'rdiff-backup')
+ $nagios2_description = 'backups', $subfolder = 'rdiff-backup')
{
include backupninja::client::rdiff_backup
@@ -50,6 +50,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 7cd5dd1..a0bcbf2 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-$real_host": 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"]) {