summaryrefslogtreecommitdiff
path: root/manifests/tlspolicy.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-25 14:03:24 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-25 14:03:24 -0200
commit8b78b15e57c4b802be46c540a16be42fd23435f5 (patch)
tree7f5b17dcf1da2de3626d3105c961534b16c1db87 /manifests/tlspolicy.pp
parent5e806b99e2448dfb4bcd880b3c77578e1a15c8aa (diff)
Switching to parametrized classes
Diffstat (limited to 'manifests/tlspolicy.pp')
-rw-r--r--manifests/tlspolicy.pp13
1 files changed, 5 insertions, 8 deletions
diff --git a/manifests/tlspolicy.pp b/manifests/tlspolicy.pp
index fb7020d..e1272b9 100644
--- a/manifests/tlspolicy.pp
+++ b/manifests/tlspolicy.pp
@@ -5,18 +5,15 @@
# via postfix::tlspolicy_snippet defines
#
# Parameters:
-# - $postfix_tls_fingerprint_digest (defaults to sha1)
+# - $fingerprint_digest (defaults to sha1)
#
# Note that this class is useless when used directly.
# The postfix::tlspolicy_snippet defines takes care of importing
# it anyway.
#
-class postfix::tlspolicy {
-
- # Default value for parameters
- case $postfix_tls_fingerprint_digest {
- "": { $postfix_tls_fingerprint_digest = 'sha1' }
- }
+class postfix::tlspolicy(
+ $fingerprint_digest = 'sha1'
+) {
include common::moduledir
module_dir{'postfix/tls_policy': }
@@ -37,7 +34,7 @@ class postfix::tlspolicy {
}
postfix::config {
- 'smtp_tls_fingerprint_digest': value => "$postfix_tls_fingerprint_digest";
+ 'smtp_tls_fingerprint_digest': value => "$fingerprint_digest";
}
postfix::config { 'smtp_tls_policy_maps':