aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-24 16:21:55 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-24 16:21:55 -0200
commitfc688a8ff02444b9b44a9ab5221bb3106599a12f (patch)
treeeccb5ce29586b9e0dbf3904e964611bfbfa61f26
parenta96810813767a5353a47f0534e20d0d9f34ae5a4 (diff)
downloadpuppet-backup-fc688a8ff02444b9b44a9ab5221bb3106599a12f.tar.gz
puppet-backup-fc688a8ff02444b9b44a9ab5221bb3106599a12f.tar.bz2
Parametrizing backup class
-rw-r--r--manifests/init.pp10
1 files changed, 4 insertions, 6 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 24fec59..06b08f6 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -35,7 +35,9 @@ $backup_exclude_encrypted = [ "$backupdir/duplicity/.ssh", ]
# ensure the latest backup version
$backupninja_ensure_version = 'latest'
-class backup {
+class backup(
+ $when = hiera('backup::when', 'everyday at 01:00')
+) {
include backupninja::server
include backupninja::client::duplicity
@@ -44,14 +46,10 @@ class backup {
package { "debconf-utils": ensure => installed, }
package { "hwinfo": ensure => installed, }
- case $backup_when {
- '': { $backup_when = 'everyday at 01:00' }
- }
-
backupninja::config { "conf":
loglvl => 4,
usecolors => false,
- when => $backup_when,
+ when => $when,
}
file { "$backupdir_remote":