aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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