diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2016-06-24 15:49:00 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2016-06-24 15:49:00 -0300 |
commit | be9c94b16da2f3198b1f14206d54cecf3cad66dd (patch) | |
tree | ca4329b9b56aa9dfed11c30215bf6460da512869 | |
parent | 32e9a333a526b7e168467efc8aeec81574564b7d (diff) | |
download | puppet-backup-be9c94b16da2f3198b1f14206d54cecf3cad66dd.tar.gz puppet-backup-be9c94b16da2f3198b1f14206d54cecf3cad66dd.tar.bz2 |
Password may not be specified if backup is absent
-rw-r--r-- | manifests/duplicity.pp | 9 |
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 |