Commit 08d43f8c authored by Micah Anderson's avatar Micah Anderson

Merge commit '6734c256'

Conflicts:
	manifests/dup.pp
parents 8c72b1b4 6734c256
......@@ -72,14 +72,18 @@ class backupninja::client {
case $install_key {
true: {
file { "${backupninja::client::real_keydestination}":
ensure => directory,
mode => 0700, owner => $key_owner, group => $key_group,
if !defined(File["${backupninja::client::real_keydestination}"]) {
file { "${backupninja::client::real_keydestination}":
ensure => directory,
mode => 0700, owner => $key_owner, group => $key_group,
}
}
file { "${backupninja::client::real_keydestination}/id_${key_type}":
source => "${key_store}/${real_user}_id_${key_type}",
mode => 0400, owner => $key_owner, group => $key_group,
require => File["${backupninja::client::real_keydestination}"],
if !defined(File["${backupninja::client::real_keydestination/id_${key_type}"]) {
file { "${backupninja::client::real_keydestination}/id_${key_type}":
source => "${key_store}/${real_user}_id_${key_type}",
mode => 0400, owner => $key_owner, group => $key_group,
require => File["${backupninja::client::real_keydestination}"],
}
}
}
}
......
......@@ -79,7 +79,7 @@ define backupninja::duplicity( $order = 90,
$destuser = false,
# configs to backupninja client
$backupkeystore = false,
$backupkeytype = false,
$backupkeytype = '',
# options to backupninja server sandbox
$ssh_dir_manage = true,
$ssh_dir = false,
......
......@@ -25,7 +25,7 @@ define backupninja::rdiff(
"/home", "/usr/local/*bin", "/var/lib/dpkg/status*" ],
$vsinclude = false, $keep = 30, $sshoptions = false, $options = false, $ssh_dir_manage = true,
$ssh_dir = false, $authorized_keys_file = false, $installuser = true, $installkey = true,
$backuptag = false)
$backuptag = false, $home = false, $backupkeytype = '')
{
include backupninja::client
......@@ -35,12 +35,17 @@ define backupninja::rdiff(
'remote': {
case $host { false: { err("need to define a host for remote backups!") } }
$real_home = $home ? {
false => $directory,
default => $home,
}
backupninja::server::sandbox
{
"${user}-${name}": user => $user, host => $host, dir => $directory,
"${user}-${name}": user => $user, host => $host, dir => $real_home,
manage_ssh_dir => $ssh_dir_manage, ssh_dir => $ssh_dir,
authorized_keys_file => $authorized_keys_file, installuser => $installuser,
backuptag => $backuptag
backuptag => $backuptag, keytype => $backupkeytype,
}
backupninja::client::key
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment