diff options
author | Micah Anderson <micah@riseup.net> | 2009-08-27 19:47:12 -0400 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2009-08-27 19:47:12 -0400 |
commit | 08d43f8c6d6a60f456cb82f2fb270f48470c96d7 (patch) | |
tree | a178e6a1adc2adaba86d9ed08ca007fad97a7aa1 /manifests | |
parent | 8c72b1b43a428ccebb2b629ed60f06ff71650c17 (diff) | |
parent | 6734c256525e1dd42ba3648db82083bcabca66ed (diff) | |
download | puppet-backupninja-08d43f8c6d6a60f456cb82f2fb270f48470c96d7.tar.gz puppet-backupninja-08d43f8c6d6a60f456cb82f2fb270f48470c96d7.tar.bz2 |
Merge commit '6734c256525e1dd42ba3648db82083bcabca66ed'
Conflicts:
manifests/dup.pp
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/client.pp | 18 | ||||
-rw-r--r-- | manifests/dup.pp | 2 | ||||
-rw-r--r-- | manifests/rdiff.pp | 11 |
3 files changed, 20 insertions, 11 deletions
diff --git a/manifests/client.pp b/manifests/client.pp index ef449f5..c3d186d 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -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}"], + } } } } diff --git a/manifests/dup.pp b/manifests/dup.pp index c4554ee..5e58c2b 100644 --- a/manifests/dup.pp +++ b/manifests/dup.pp @@ -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, diff --git a/manifests/rdiff.pp b/manifests/rdiff.pp index 1207cb1..98a74b2 100644 --- a/manifests/rdiff.pp +++ b/manifests/rdiff.pp @@ -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 |