From 8b78b15e57c4b802be46c540a16be42fd23435f5 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 25 Jan 2013 14:03:24 -0200 Subject: Switching to parametrized classes --- manifests/tlspolicy.pp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'manifests/tlspolicy.pp') 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': -- cgit v1.2.3