aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-06-24 15:49:00 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-06-24 15:49:00 -0300
commitbe9c94b16da2f3198b1f14206d54cecf3cad66dd (patch)
treeca4329b9b56aa9dfed11c30215bf6460da512869
parent32e9a333a526b7e168467efc8aeec81574564b7d (diff)
downloadpuppet-backup-be9c94b16da2f3198b1f14206d54cecf3cad66dd.tar.gz
puppet-backup-be9c94b16da2f3198b1f14206d54cecf3cad66dd.tar.bz2
Password may not be specified if backup is absent
-rw-r--r--manifests/duplicity.pp9
1 files changed, 7 insertions, 2 deletions
diff --git a/manifests/duplicity.pp b/manifests/duplicity.pp
index 82f057d..2da5db1 100644
--- a/manifests/duplicity.pp
+++ b/manifests/duplicity.pp
@@ -11,8 +11,13 @@ define backup::duplicity(
$directory = "${backup::params::backupdir}/duplicity"
) {
- case $encryptkey { false: { err("need to define a key!") } }
- case $password { false: { err("need to define password!") } }
+ if $encryptkey == false and $ensure == 'present' {
+ err("need to define a key!")
+ }
+
+ if $password == false and $ensure == 'present' {
+ err("need to define password!")
+ }
$exclude_unencrypted = $backup::params::exclude_unencrypted
$include_unencrypted = $backup::params::include_unencrypted