diff options
author | Micah Anderson <micah@riseup.net> | 2008-05-30 16:44:37 +0000 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2008-05-30 16:44:37 +0000 |
commit | d08410db8a81ce6060eea2044c0ac09c001568ab (patch) | |
tree | 5f004e2f7f14783c37d901c80ed4473bf3e5c8ac | |
parent | 4f83549a500e2cc53517e00759828905e70a162b (diff) | |
download | puppet-backupninja-d08410db8a81ce6060eea2044c0ac09c001568ab.tar.gz puppet-backupninja-d08410db8a81ce6060eea2044c0ac09c001568ab.tar.bz2 |
fix backupninja rdiff server sandbox to enable multiple rdiff definitions differentiated
by their name variable
-rw-r--r-- | manifests/rdiff.pp | 2 | ||||
-rw-r--r-- | manifests/server.pp | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/manifests/rdiff.pp b/manifests/rdiff.pp index 6249086..02f72e6 100644 --- a/manifests/rdiff.pp +++ b/manifests/rdiff.pp @@ -31,7 +31,7 @@ define backupninja::rdiff($order = 90, case $type { 'remote': { case $host { false: { err("need to define a host for remote backups!") } } - backupninja::server::sandbox { $user: host => $host, dir => $directory } + backupninja::server::sandbox { $user-$name: user => $user, host => $host, dir => $directory } backupninja::client::key { $user: } } } diff --git a/manifests/server.pp b/manifests/server.pp index c08b33d..dbeeca0 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -20,7 +20,12 @@ class backupninja::server { # this define allows nodes to declare a remote backup sandbox, that have to # get created on the server - define sandbox($host = false, $dir = false, $backupkeys = false, $uid = false, $gid = "backupninjas") { + define sandbox($user = false, $host = false, $dir = false, $backupkeys = false, $uid = false, $gid = "backupninjas") { + $real_user = $name ? { + false => $name, + default => $user, + '' => $name, + } $real_host = $host ? { false => $fqdn, default => $host, |