From 9afb297ee9ea87061b83fa17d4195946443ed80e Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 20 Aug 2014 11:32:52 -0300 Subject: Changes for autoloading --- manifests/rdiff.pp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 manifests/rdiff.pp (limited to 'manifests/rdiff.pp') diff --git a/manifests/rdiff.pp b/manifests/rdiff.pp new file mode 100644 index 0000000..1870cf8 --- /dev/null +++ b/manifests/rdiff.pp @@ -0,0 +1,32 @@ +# default backupninja::rdiff configuration +define backup::rdiff( + $port = '22', + $ensure = present +) { + backupninja::rdiff { "rdiff-$title.$domain": + ensure => $ensure, + options => "--remote-schema 'ssh -p $port -C %s rdiff-backup --server'", + # [source] + keep => "10", + include => $backup::params::backup_include_encrypted, + exclude => $backup::params::backup_exclude_encrypted, + # [dest] + type => "remote", + host => "$title.$domain", + home => "${backup::params::backupdir}/remote/$fqdn", + subfolder => "rdiff", + user => "$hostname", + sshoptions => "-p $port", + installkey => false, + backupkeytype => "rsa", + backupkeystore => "puppet:///pubkeys", + } + + if !defined(Ssh_local_key["$hostname"]) { + ssh_local_key { "$hostname": + owner => root, + group => root, + home => '/root', + } + } +} -- cgit v1.2.3