]> gitweb.fluxo.info Git - puppet-backupninja.git/commitdiff
Adjust $backuptag default value of handlers, removes $real_backuptag
authorJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>
Fri, 8 May 2015 16:58:21 +0000 (12:58 -0400)
committerJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>
Fri, 8 May 2015 16:58:21 +0000 (12:58 -0400)
manifests/duplicity.pp
manifests/rdiff.pp
manifests/rsync.pp

index cd544434dc96e1f72ae210b459edc17c579187fe..0ad8c2c26203f807862c16d9aad54e3313904c18 100644 (file)
@@ -91,7 +91,7 @@ define backupninja::duplicity( $order  = 90,
                                $ssh_dir              = "${destdir}/.ssh",
                                $authorized_keys_file = 'authorized_keys',
                                $installuser          = true,
-                               $backuptag            = false,
+                               $backuptag            = "backupninja-${::fqdn}",
                                # key options
                                $createkey            = false,
                                $keymanage            = $backupninja::keymanage ) {
index 4292c9c58f1fb535e832987d22f90947d185418d..9a86ae5a76c60d7ccbc3da3900ce0d213aff43ec 100644 (file)
@@ -26,7 +26,7 @@ define backupninja::rdiff(
                "/home", "/usr/local/*bin", "/var/lib/dpkg/status*" ],
   $vsinclude = false, $keep = 30, $sshoptions = false, $options = '--force', $ssh_dir_manage = true,
   $ssh_dir = "${home}/.ssh", $authorized_keys_file = 'authorized_keys', $installuser = true, $keymanage = $backupninja::keymanage, $key = false,
-  $backuptag = false, $backupkeytype = $backupninja::keytype, $backupkeystore = $backupninja::keystore,
+  $backuptag = "backupninja-${::fqdn}", $backupkeytype = $backupninja::keytype, $backupkeystore = $backupninja::keystore,
   $extras = false, $nagios_description = 'backups')
 {
   # install client dependencies
@@ -37,17 +37,13 @@ define backupninja::rdiff(
   case $type {
     'remote': {
       case $host { false: { err("need to define a host for remote backups!") } }
-      $real_backuptag = $backuptag ? {
-          false => "backupninja-$fqdn",
-          default => $backuptag
-      }
 
       backupninja::server::sandbox
       {
         "${user}-${name}": user => $user, host => $fqdn, dir => $home,
         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,
+        backuptag => $backuptag, keytype => $backupkeytype, backupkeys => $backupkeystore,
         nagios_description => $nagios_description
       }
      
index 6f0ca74d1b3fbc13b5f37a44e878c25b80f248e7..ee49f81184a398c62a5e3c9b8b07947c3ff9780c 100644 (file)
@@ -5,7 +5,7 @@ define backupninja::rsync(
   $order = 90, $ensure = present,
   $user = false, $home = "/home/${user}-${name}", $host = false,
   $ssh_dir_manage = true, $ssh_dir = "${home}/.ssh", $authorized_keys_file = 'authorized_keys',
-  $installuser = true, $keymanage = $backupninja::keymanage, $key = false, $backuptag = false,
+  $installuser = true, $keymanage = $backupninja::keymanage, $key = false, $backuptag = "backupninja-${::fqdn}",
   $backupkeytype = $backupninja::keytype, $backupkeystore = $backupninja::keystore, $extras = false,
   $nagios_description = 'backups', $subfolder = 'rsync',
 
@@ -41,11 +41,6 @@ define backupninja::rsync(
     'remote': {
       case $host { false: { err("need to define a host for remote backups!") } }
 
-      $real_backuptag = $backuptag ? {
-        false   => "backupninja-$fqdn",
-        default => $backuptag,
-      }
-
       $directory = "${home}/${subfolder}/"
 
       backupninja::server::sandbox { "${user}-${name}":
@@ -57,7 +52,7 @@ define backupninja::rsync(
         key                  => $key,
         authorized_keys_file => $authorized_keys_file,
         installuser          => $installuser,
-        backuptag            => $real_backuptag,
+        backuptag            => $backuptag,
         keytype              => $backupkeytype,
         backupkeys           => $backupkeystore,
         nagios_description  => $nagios_description