aboutsummaryrefslogtreecommitdiff
path: root/manifests/rsync.pp
diff options
context:
space:
mode:
authorAntoine Beaupré <anarcat+gitlab@anarc.at>2015-04-23 18:33:14 +0000
committerAntoine Beaupré <anarcat+gitlab@anarc.at>2015-04-23 18:33:14 +0000
commitfbddc25ee6e813ceffa88192fb607e63cebf8bba (patch)
treef0be23671b501770c091bafb13ae73d43cdaebda /manifests/rsync.pp
parent74ce68bcf6f1fbf938e4a161f7c6305f67378b7d (diff)
parentb24afc7ffbe844984e7a46a205e7f04d312fd04c (diff)
downloadpuppet-backupninja-fbddc25ee6e813ceffa88192fb607e63cebf8bba.tar.gz
puppet-backupninja-fbddc25ee6e813ceffa88192fb607e63cebf8bba.tar.bz2
Merge branch 'march2015-refactor' into 'master'
March2015 refactor This branch is an attempt to bring the backupninja module in the 21st century. See the upgrade notice in the README for details. See merge request !4
Diffstat (limited to 'manifests/rsync.pp')
-rw-r--r--manifests/rsync.pp18
1 files changed, 10 insertions, 8 deletions
diff --git a/manifests/rsync.pp b/manifests/rsync.pp
index 1c82889..160fad7 100644
--- a/manifests/rsync.pp
+++ b/manifests/rsync.pp
@@ -2,11 +2,12 @@
# Based on backupninja::rdiff
define backupninja::rsync(
- $order = 90, $ensure = present, $user = false, $home = false, $host = false,
+ $order = 90, $ensure = present,
+ $user = false, $home = false, $host = false,
$ssh_dir_manage = true, $ssh_dir = false, $authorized_keys_file = false,
$installuser = true, $installkey = true, $key = false, $backuptag = false,
- $home = false, $backupkeytype = "rsa", $backupkeystore = false, $extras = false,
- $nagios2_description = 'backups', $subfolder = 'rsync',
+ $home = false, $backupkeytype = $backupninja::keytype, $backupkeystore = $backupninja::keystore, $extras = false,
+ $nagios_description = 'backups', $subfolder = 'rsync',
$log = false, $partition = false, $fscheck = false, $read_only = false,
$mountpoint = false, $backupdir = false, $format = false, $days = false,
@@ -29,7 +30,8 @@ define backupninja::rsync(
$rm = false, $cp = false, $touch = false, $mv = false, $fsck = false)
{
- include backupninja::client::rsync
+ # install client dependencies
+ ensure_resource('package', 'rsync', {'ensure' => $backupninja::ensure_rsync_version})
# Right now just local origin with remote destination is supported.
$from = 'local'
@@ -63,10 +65,10 @@ define backupninja::rsync(
backuptag => $real_backuptag,
keytype => $backupkeytype,
backupkeys => $backupkeystore,
- nagios2_description => $nagios2_description
+ nagios_description => $nagios_description
}
- backupninja::client::key { "${user}-${name}":
+ backupninja::key { "${user}-${name}":
user => $user,
host => $host,
installkey => $installkey,
@@ -76,12 +78,12 @@ define backupninja::rsync(
}
}
- file { "${backupninja::client::defaults::configdir}/${order}_${name}.rsync":
+ file { "${backupninja::configdir}/${order}_${name}.rsync":
ensure => $ensure,
content => template('backupninja/rsync.conf.erb'),
owner => root,
group => root,
mode => 0600,
- require => File["${backupninja::client::defaults::configdir}"]
+ require => File["${backupninja::configdir}"]
}
}