From 115d16718c85ceae07fdde36d1f846f8de0402ba Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 14 Jan 2014 12:48:37 -0200 Subject: Adding use_domain and use_fqdn for backup::rsync --- manifests/init.pp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 9c29d27..73c78e2 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -203,13 +203,18 @@ class backup( } } - define rsync($port = '22', $ensure = present, $installkey = true, $bandwidthlimit = false) { - backupninja::rsync { "rsync-$title.$domain": + define rsync($port = '22', + $ensure = present, + $installkey = true, + $bandwidthlimit = false, + $use_domain = $::domain, + $use_fqdn = $::fqdn) { + backupninja::rsync { "rsync-$title.$use_domain": # [general] ensure => $ensure, installkey => $installkey, - home => "$backupdir/remote/$fqdn", - backupdir => "$backupdir/remote/$fqdn/rsync", + home => "$backupdir/remote/$use_fqdn", + backupdir => "$backupdir/remote/$use_fqdn/rsync", backupkeytype => "rsa", id_file => "/root/.ssh/id_rsa", backupkeystore => "puppet:///modules/site_keys", @@ -217,14 +222,14 @@ class backup( keepweekly => '2', keepmonthly => '2', format => 'long', - log => "/var/log/backup/rsync-$title.$domain.log", - lockfile => "/var/lock/rsync-$title.$domain.lock", + log => "/var/log/backup/rsync-$title.$use_domain.log", + lockfile => "/var/lock/rsync-$title.$use_domain.lock", # [source] include => $backup_include_encrypted, exclude => $backup_exclude_encrypted, # [dest] user => "$hostname", - host => "$title.$domain", + host => "$title.$use_domain", port => $port, bandwidthlimit => $bandwidthlimit, compress => '1', -- cgit v1.2.3