]> gitweb.fluxo.info Git - puppet-backupninja.git/commitdiff
Adds sandbox param for rsync, rdiff and duplicity
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 19 Mar 2016 14:46:11 +0000 (11:46 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 19 Mar 2016 14:46:11 +0000 (11:46 -0300)
manifests/duplicity.pp
manifests/rdiff.pp
manifests/rsync.pp

index a05da876b4c96669690b317029a03037694ad5b9..bb70045380d3489faa4b2488922b9a7135354bb5 100644 (file)
@@ -90,6 +90,7 @@ define backupninja::duplicity( $order  = 90,
                                $ssh_dir_manage       = true,
                                $ssh_dir              = "${destdir}/.ssh",
                                $authorized_keys_file = 'authorized_keys',
+                               $sandbox              = true,
                                $installuser          = true,
                                $backuptag            = "backupninja-${::fqdn}",
                                # key options
@@ -104,17 +105,19 @@ define backupninja::duplicity( $order  = 90,
   case $password { false: { err("a password is necessary either to unlock the GPG key, or for symmetric encryption!") } }
 
   # guarantees there's a configured backup space for this backup
-  backupninja::server::sandbox { "${user}-${name}":
-    user                 => $destuser,
-    host                 => $desthost,
-    dir                  => $destdir,
-    manage_ssh_dir       => $ssh_dir_manage,
-    ssh_dir              => $ssh_dir,
-    authorized_keys_file => $authorized_keys_file,
-    installuser          => $installuser,
-    backuptag            => $backuptag,
-    backupkeys           => $backupkeystore,
-    keytype              => $backupkeytype,
+  if $sandbox {
+    backupninja::server::sandbox { "${user}-${name}":
+      user                 => $destuser,
+      host                 => $desthost,
+      dir                  => $destdir,
+      manage_ssh_dir       => $ssh_dir_manage,
+      ssh_dir              => $ssh_dir,
+      authorized_keys_file => $authorized_keys_file,
+      installuser          => $installuser,
+      backuptag            => $backuptag,
+      backupkeys           => $backupkeystore,
+      keytype              => $backupkeytype,
+    }
   }
 
   # the client's ssh key
index cd73d22c1a9daa1d3cb22d40fdaf61c77e358761..294ec78b0f0f357ef18e18eadcb2a81eeef035ef 100644 (file)
@@ -54,6 +54,7 @@ define backupninja::rdiff( $order  = 90,
                            $ssh_dir        = "${home}/.ssh",
                            $authorized_keys_file = 'authorized_keys',
                            # sandbox config
+                           $sandbox     = true,
                            $installuser = true,
                            $backuptag   = "backupninja-${::fqdn}",
                            # monitoring
@@ -68,18 +69,20 @@ define backupninja::rdiff( $order  = 90,
     'remote': {
       case $host { false: { err("need to define a host for remote backups!") } }
 
-      backupninja::server::sandbox { "${user}-${name}":
-        user                 => $user,
-        host                 => $host,
-        dir                  => $home,
-        manage_ssh_dir       => $ssh_dir_manage,
-        ssh_dir              => $ssh_dir,
-        key                  => $key,
-        authorized_keys_file => $authorized_keys_file,
-        installuser          => $installuser,
-        backuptag            => $backuptag,
-        backupkeys           => $backupkeystore,
-        keytype              => $backupkeytype,
+      if $sandbox {
+        backupninja::server::sandbox { "${user}-${name}":
+          user                 => $user,
+          host                 => $host,
+          dir                  => $home,
+          manage_ssh_dir       => $ssh_dir_manage,
+          ssh_dir              => $ssh_dir,
+          key                  => $key,
+          authorized_keys_file => $authorized_keys_file,
+          installuser          => $installuser,
+          backuptag            => $backuptag,
+          backupkeys           => $backupkeystore,
+          keytype              => $backupkeytype,
+        }
       }
      
       backupninja::key { "${user}-${name}":
index a6434153994a9d742e49c912fc3411f64ae1b579..56d37dd1d69c8392a2616d072cda04b74cd07639 100644 (file)
@@ -71,6 +71,7 @@ define backupninja::rsync( $order  = 90,
                            $ssh_dir              = "${home}/.ssh",
                            $authorized_keys_file = 'authorized_keys',
                            # sandbox config
+                           $sandbox     = true,
                            $installuser = true,
                            $backuptag   = "backupninja-${::fqdn}",
                            # monitoring
@@ -88,18 +89,20 @@ define backupninja::rsync( $order  = 90,
     'remote': {
       case $host { false: { err("need to define a host for remote backups!") } }
 
-      backupninja::server::sandbox { "${user}-${name}":
-        user                 => $user,
-        host                 => $host,
-        dir                  => $home,
-        manage_ssh_dir       => $ssh_dir_manage,
-        ssh_dir              => $ssh_dir,
-        key                  => $key,
-        authorized_keys_file => $authorized_keys_file,
-        installuser          => $installuser,
-        backuptag            => $backuptag,
-        keytype              => $backupkeytype,
-        backupkeys           => $backupkeystore,
+      if $sandbox {
+        backupninja::server::sandbox { "${user}-${name}":
+          user                 => $user,
+          host                 => $host,
+          dir                  => $home,
+          manage_ssh_dir       => $ssh_dir_manage,
+          ssh_dir              => $ssh_dir,
+          key                  => $key,
+          authorized_keys_file => $authorized_keys_file,
+          installuser          => $installuser,
+          backuptag            => $backuptag,
+          keytype              => $backupkeytype,
+          backupkeys           => $backupkeystore,
+        }
       }
      
       backupninja::key { "${user}-${name}":