diff options
| author | Silvio Rhatto <rhatto@riseup.net> | 2014-01-14 12:48:37 -0200 | 
|---|---|---|
| committer | Silvio Rhatto <rhatto@riseup.net> | 2014-01-14 12:48:37 -0200 | 
| commit | 115d16718c85ceae07fdde36d1f846f8de0402ba (patch) | |
| tree | f758c527fa53b0576f2e6144071d5cda389f5865 /manifests | |
| parent | 5dba68ca20097b6ce8e2b6e72565e81f60855ba3 (diff) | |
| download | puppet-backup-115d16718c85ceae07fdde36d1f846f8de0402ba.tar.gz puppet-backup-115d16718c85ceae07fdde36d1f846f8de0402ba.tar.bz2  | |
Adding use_domain and use_fqdn for backup::rsync
Diffstat (limited to 'manifests')
| -rw-r--r-- | manifests/init.pp | 19 | 
1 files 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',  | 
