aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/init.pp20
1 files changed, 14 insertions, 6 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 95d5d2a..848165f 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -20,13 +20,16 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# backup folder
+$backupdir = "/var/backups"
+
# for data that's going to be encrypted and signed
$backup_include_unencrypted = [ "/etc", "/var", "/home", ]
-$backup_exclude_unencrypted = [ "/var/backups/remote", "/var/vservers", "/var/backups/duplicity" ]
+$backup_exclude_unencrypted = [ "$backupdir/remote", "/var/vservers", "$backupdir/duplicity" ]
# for data that were previously encrypted and signed
-$backup_include_encrypted = [ "/var/backups/duplicity", ]
-$backup_exclude_encrypted = [ "/var/backups/duplicity/.ssh", ]
+$backup_include_encrypted = [ "$backupdir/duplicity", ]
+$backup_exclude_encrypted = [ "$backupdir/duplicity/.ssh", ]
class backup {
@@ -42,6 +45,11 @@ class backup {
usecolors => false,
}
+ # TODO: temporary resource to be removed in the long run
+ file { "/backups":
+ ensure => absent,
+ }
+
# default backupninja::rdiff configuration
define rdiff($port = '22', $ensure = present, $installkey = true) {
backupninja::rdiff { "rdiff-$title.$domain":
@@ -54,7 +62,7 @@ class backup {
# [dest]
type => "remote",
host => "$title.$domain",
- home => "/var/backups/remote/$fqdn",
+ home => "$backupdir/remote/$fqdn",
subfolder => "rdiff",
user => "$hostname",
sshoptions => "-p $port",
@@ -72,7 +80,7 @@ class backup {
$full_if_older_than = "1M",
$remove_older_than = "45D",
$periodic_check = present,
- $directory = "/var/backups/duplicity") {
+ $directory = "${backupdir}/duplicity") {
case $encryptkey { false: { err("need to define a key!") } }
case $password { false: { err("need to define password!") } }
@@ -80,7 +88,7 @@ class backup {
include backupninja::client
# backup dest folder
- file { "/var/backups/duplicity":
+ file { "$backupdir/duplicity":
ensure => directory,
owner => "root",
group => "root",