diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-01-24 16:21:55 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-01-24 16:21:55 -0200 |
commit | fc688a8ff02444b9b44a9ab5221bb3106599a12f (patch) | |
tree | eccb5ce29586b9e0dbf3904e964611bfbfa61f26 | |
parent | a96810813767a5353a47f0534e20d0d9f34ae5a4 (diff) | |
download | puppet-backup-fc688a8ff02444b9b44a9ab5221bb3106599a12f.tar.gz puppet-backup-fc688a8ff02444b9b44a9ab5221bb3106599a12f.tar.bz2 |
Parametrizing backup class
-rw-r--r-- | manifests/init.pp | 10 |
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": |