From 100bb69f2e721332e71e4e5bf8dd96cf3499296c Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Fri, 30 May 2008 17:43:51 +0000 Subject: change the backupninja::client::key definition to use the $user variable change the $host variable to no longer use the $user variable, that way multiple rdiff's can be instantiated for a particular host, with different name variables in order to do that, the class also has to have the $installkeys variable that can be passed to backupninja::client::key so that the second rdiff instantiation would set installkeys => false, otherwise there will be an attempt to duplicate the resource --- manifests/rdiff.pp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'manifests/rdiff.pp') diff --git a/manifests/rdiff.pp b/manifests/rdiff.pp index 02f72e6..aec4d96 100644 --- a/manifests/rdiff.pp +++ b/manifests/rdiff.pp @@ -25,14 +25,15 @@ define backupninja::rdiff($order = 90, $include = [ "/var/spool/cron/crontabs", "/var/backups", "/etc", "/root", "/home", "/usr/local/*bin", "/var/lib/dpkg/status*" ], $keep = 30, $sshoptions = false, - $options = false + $options = false, + $installkeys = true ) { include backupninja::client case $type { 'remote': { case $host { false: { err("need to define a host for remote backups!") } } - backupninja::server::sandbox { $user-$name: user => $user, host => $host, dir => $directory } - backupninja::client::key { $user: } + backupninja::server::sandbox { "${user}-${name}": user => $user, host => $host, dir => $directory } + backupninja::client::key { "${user}-${name}": user => $user, host => $host, installkeys => $installkeys } } } file { "${backupninja::client::configdir}/${order}_${name}.rdiff": -- cgit v1.2.3