aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-03-19 11:46:11 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-03-19 11:46:11 -0300
commit72bb9a5cd5c20413992f140476d43ca837f65c1d (patch)
tree5373cf98f40d8c36cac8d1dd97874c6f45b9e997 /manifests
parente1a96d9f3fd04fb8c82c2f53e7cd53322c134104 (diff)
downloadpuppet-backupninja-72bb9a5cd5c20413992f140476d43ca837f65c1d.tar.gz
puppet-backupninja-72bb9a5cd5c20413992f140476d43ca837f65c1d.tar.bz2
Adds sandbox param for rsync, rdiff and duplicity
Diffstat (limited to 'manifests')
-rw-r--r--manifests/duplicity.pp25
-rw-r--r--manifests/rdiff.pp27
-rw-r--r--manifests/rsync.pp27
3 files changed, 44 insertions, 35 deletions
diff --git a/manifests/duplicity.pp b/manifests/duplicity.pp
index a05da87..bb70045 100644
--- a/manifests/duplicity.pp
+++ b/manifests/duplicity.pp
@@ -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
diff --git a/manifests/rdiff.pp b/manifests/rdiff.pp
index cd73d22..294ec78 100644
--- a/manifests/rdiff.pp
+++ b/manifests/rdiff.pp
@@ -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}":
diff --git a/manifests/rsync.pp b/manifests/rsync.pp
index a643415..56d37dd 100644
--- a/manifests/rsync.pp
+++ b/manifests/rsync.pp
@@ -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}":