aboutsummaryrefslogtreecommitdiff
path: root/manifests/rdiff.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/rdiff.pp')
-rw-r--r--manifests/rdiff.pp23
1 files changed, 15 insertions, 8 deletions
diff --git a/manifests/rdiff.pp b/manifests/rdiff.pp
index e3964d0..2eb1d9b 100644
--- a/manifests/rdiff.pp
+++ b/manifests/rdiff.pp
@@ -25,25 +25,32 @@ define backupninja::rdiff(
"/home", "/usr/local/*bin", "/var/lib/dpkg/status*" ],
$vsinclude = false, $keep = 30, $sshoptions = false, $options = false, $ssh_dir_manage = true,
$ssh_dir = false, $authorized_keys_file = false, $installuser = true, $installkey = true,
- $backuptag = false)
+ $backuptag = false, $home = false, $backupkeytype = '')
{
include backupninja::client
case $type {
'remote': {
case $host { false: { err("need to define a host for remote backups!") } }
+ $real_home = $home ? {
+ false => $directory,
+ default => $home,
+ }
+
backupninja::server::sandbox
{
- "${user}-${name}": user => $user, host => $host, dir => $directory,
+ "${user}-${name}": user => $user, host => $host, dir => $real_home,
manage_ssh_dir => $ssh_dir_manage, ssh_dir => $ssh_dir,
authorized_keys_file => $authorized_keys_file, installuser => $installuser,
- backuptag => $backuptag
+ backuptag => $backuptag, keytype => $backupkeytype,
}
-
- backupninja::client::key
- {
- "${user}-${name}": user => $user, host => $host,
- installkey => $installkey
+
+ if !defined(Backupninja::client::key["${user}-${name}"]) {
+ backupninja::client::key
+ {
+ "${user}-${name}": user => $user, host => $host,
+ installkey => $installkey
+ }
}
}
}